<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace dix_nez_lande
{
    public class UnitFactory
    {
        #region Singleton

        private static UnitFactory _instance = null;

        private UnitFactory()
        {
        }

        public static UnitFactory getUnitFactory()
        {
            if (_instance == null)
                _instance = new UnitFactory();
            return _instance;
        }
        #endregion

        public List<Unit> createArmy(Race race, int nb)
        {
            List<Unit> list = new List<Unit>();
            for (int i = 0; i < nb; i++)
            {
                //voir nomdefantasy.com pour plus de pimp
                list.Add(new UnitImpl(race, "Unit " + i));
            }
            return list;<commit_msg>Update UnitFactory.createArmy()<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace dix_nez_lande
{
    public class UnitFactory
    {
        #region Singleton

        private static UnitFactory _instance = null;

        private UnitFactory()
        {
        }

        public static UnitFactory getUnitFactory()
        {
            if (_instance == null)
                _instance = new UnitFactory();
            return _instance;
        }
        #endregion

        public List<Unit> createArmy(Race race, int sizeMap)
        {
            int nb;
            switch (sizeMap)
            {
                case 6:
                    nb = 4;
                    break;
                case 10:
                    nb = 6;
                    break;
                case 8:
                    nb = 8;
                    break;
                default:
                    nb=4;
                    break;
            }
            List<Unit> list = new List<Unit>();
            for (int i = 0; i < nb; i++)
            {
                //voir nomdefantasy.com pour plus de pimp
                list.Add(new UnitImpl(race, "Unit " + i));
            }
            return list;
{'fraction_non_alphanumeric': 0.08149568552253116, 'fraction_numerical': 0.004793863854266539, 'mean_word_length': 1.2108050847457628, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5556713', 'n_tokens_mistral': 567, 'n_tokens_neox': 528, 'n_words': 150}