boolean hasWon()

in tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java [52:67]


  boolean hasWon(MarkerType theSeed) {
    return ((cells[currentRow][0] == theSeed
            && cells[currentRow][1] == theSeed
            && cells[currentRow][2] == theSeed)
        || (cells[0][currentCol] == theSeed
            && cells[1][currentCol] == theSeed
            && cells[2][currentCol] == theSeed)
        || (currentRow == currentCol
            && cells[0][0] == theSeed
            && cells[1][1] == theSeed
            && cells[2][2] == theSeed)
        || (currentRow + currentCol == 2
            && cells[0][2] == theSeed
            && cells[1][1] == theSeed
            && cells[2][0] == theSeed));
  }