public Game(Chessboard chessboard,Player player) { this.Chessboard = chessboard; this.Player = player; }
public static Game CreateGame(Player player, Chessboard chessboard) { return new Game(chessboard, player); }
public static Game ContinueGame(Player player, string gameNumber) { var game = UnFinishedGames.Single(g => g.Player.Equals(player) && g.GameNumber == gameNumber); return game; }
public static Game CreateGame(Player player, string chessManualNumber) { var chessboard = ChessboardFactory.CreateChessboard(chessManualNumber); return new Game(chessboard, player); }
protected bool Equals(Player other) { return string.Equals(this.Name, other.Name); }