public void Not_Play_A_Played_Position() { var sut = new Game(Id); sut.Play(BoardRowColumn.Create(0, 0)); Assert.Throws <PostionAlreadyPlayedException>(() => sut.Play(BoardRowColumn.Create(0, 0))); }
public string Play(BoardRowColumn boardRowColumn) { var result = board.Play(boardRowColumn.ToListIndex()); UpdateStatus(); return(result); }
public void Start_Placing_X() { var exptectedResult = "X"; var sut = new Game(Id); var result = sut.Play(BoardRowColumn.Create(0, 0)); Assert.Equal(exptectedResult, result); }
public async Task PlayAsync(Guid gameIdRaw, int row, int column) { var currGame = await GetGameFrom(gameIdRaw); var boardColumnRow = BoardRowColumn.Create(row, column); currGame.Play(boardColumnRow); await repository.SaveGame(currGame); }
public void Place_O_After_X_Played() { var exptectedResult = "O"; var sut = new Game(Id); sut.Play(BoardRowColumn.Create(1, 0)); var result = sut.Play(BoardRowColumn.Create(0, 0)); Assert.Equal(exptectedResult, result); }
public string Play(BoardRowColumn rowColumn) => Play(rowColumn.ToListIndex());