public Population(int count)
 {
     Generation = 0;
     Players    = new  List <PopulationItem> ();
     for (int i = 0; i < count; i++)
     {
         var item = new PopulationItem();
         item.Player = AIGeneticPlayer.CreateRandom();
         Players.Add(item);
     }
 }
Пример #2
0
    void PlayMatch()
    {
        List <Player> players = new List <Player> ()
        {
            new HumanPlayer(_view.TurnView),
            AIGeneticPlayer.CreateRandom(),
            AIGeneticPlayer.CreateRandom(),
            new AIRandomPlayer()
        };

        _game = new Game(players);
        _view.Init(_game);
        Thread thread = new Thread(new ThreadStart(() => { _game.Play(() => {
                Debug.Log("Match ended");
            }); }));

        thread.Start();
    }