Inheritance: IGame, IGameForUpdate
示例#1
0
 public University(Game game, Color color, int playerIndex)
 {
     _game = game;
     Color = color;
     PlayerIndex = playerIndex;
     Reset();
 }
示例#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,
                };
 }
示例#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);
 }
示例#4
0
 public void SetGame(Game.Game game)
 {
     _game = game;
     _board = game.Board;
     InitialiseBuffer();
 }
示例#5
0
        public void SaveGame(Game game, string gameName)
        {
            // save board

            // save the game
        }