Ejemplo n.º 1
0
        public void StartGame(MenuWindow window)
        {
            if(!IsRandomSeed)
                Randomizer.SetSeed(Seed);

            Game game = new Game(new Board(BoardHeight, BoardWidth, (BoardHeight * 20), (BoardWidth * 20)));

            for (int i = 0; i < Players.Count; i++)
            {
                if (Players[i].Name == null)
                    Players[i].Name = GetRandomName(Players[i].IsBot);

                if (Players[i].IsBot)
                    game.AddBot(Players[i].Name);
                else
                    game.AddHuman(Players[i].Name);
            }

            MainWindow mainWindow = new MainWindow(game, (BoardHeight * 20), (BoardWidth * 20));
            mainWindow.Show();
            window.Close();
        }