public University(Game game, Color color, int playerIndex) { _game = game; Color = color; PlayerIndex = playerIndex; Reset(); }
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, }; }
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); }
public void SetGame(Game.Game game) { _game = game; _board = game.Board; InitialiseBuffer(); }
public void SaveGame(Game game, string gameName) { // save board // save the game }