Пример #1
0
        public void InitializeNewGame(int numberOfPlayers, int numberOfComputers, string gameName)
        {
            Game = StartUp.CreatePlayers();

            NewGame.SetupPlayers(numberOfPlayers, numberOfComputers, ref Game);

            // Clear the Listview and write that a new game has started to the user.
            HistoryList.Clear();
            AddMessageToHistoryList("New Game Started!");

            Game.Name = gameName;
            Game.SetPlayerTurn(0);

            Context.Add(Game);
            Context.SaveChanges();

            SavedGames = Load.LoadSavedGames();
        }