public StartingANewGame() { var output = new TestOutput(); _app = new ChessApp(output); _app.Handle(new CreateGameAppCommand()); _latestGameName = output.LatestGameName; _newGame = _app.GetGame(_latestGameName); }
public JoiningAGameFullOfPlayers() { _output = new TestOutput(); var app = new ChessApp(_output); app.Handle(new CreateGameAppCommand()); var latestGameName = _output.LatestGameName; var newGame = app.GetGame(latestGameName); app.Handle(new JoinGameAppCommand(latestGameName, "denise", PlayerColour.Black)); app.Handle(new JoinGameAppCommand(latestGameName, "derek", PlayerColour.White)); _existingBlackPlayer = newGame.GetPlayer(PlayerColour.Black); _existingWhitePlayer = newGame.GetPlayer(PlayerColour.White); app.Handle(new JoinGameAppCommand(latestGameName, "gary", PlayerColour.Black)); }