// Note: This method returns IEnumerable<string> // this is done to allow the method to return its title. // if you use this method make sure to yield return the title as the very first action IEnumerable<string> GivenTheFollowingBoard() { yield return string.Format( BoardStateTemplate, string.Join(", ", _firstRow), string.Join(", ", _secondRow), string.Join(", ", _thirdRow)); Game = new Game(_firstRow, _secondRow, _thirdRow); }
public bool Equals(Game other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; for (int i = 0; i < 3; i++) { if(!_board[i].SequenceEqual(other._board[i])) return false; } return true; }
protected void GivenANewGame() { Game = new Game(); }
void GivenTheFollowingBoard(string[] firstRow, string[] secondRow, string[] thirdRow) { Game = new Game(firstRow, secondRow, thirdRow); }