Inheritance: IGame, IGameForUpdate
Esempio n. 1
0
 public University(Game game, Color color, int playerIndex)
 {
     _game = game;
     Color = color;
     PlayerIndex = playerIndex;
     Reset();
 }
Esempio n. 2
0
 internal static TurnInfo Create(Game game, IPlayerMoveForUpdate move)
 {
     return new TurnInfo
                {
                    Move = move,
                    AllMoves = game.GenerateAllMoves(),
                    MostFailedStartUps = game.MostFailedStartUps,
                    MostInternetLinks = game.LongestInternetLink,
                    Hash = game.Hash,
                    CurrentUnversityLongestLink = game.CurrentUniversity.LengthOfLongestLink,
                };
 }
Esempio n. 3
0
 public GameController(IGameViewer viewer, Game game, bool hasHumanPlayer, params IPlayer[] players)
 {
     Viewer = viewer;
     Viewer.SetGame(game);
     _players = players;
     Game = game;
     if (_players == null || _players.Length != Game.NumberOfUniversities)
     {
         throw new ArgumentException("Number of players does not match number of universities in the game");
     }
     Game.HasHumanPlayer = hasHumanPlayer;
     Debug.Assert(Game.Board.IsLocked);
 }
Esempio n. 4
0
 public void SetGame(Game.Game game)
 {
     _game = game;
     _board = game.Board;
     InitialiseBuffer();
 }
Esempio n. 5
0
        public void SaveGame(Game game, string gameName)
        {
            // save board

            // save the game
        }