static Position getPosition(char[][] board, char target) {
    for (int i = 0; i < board.length; i++) {
      for (int j = 0; j < board[i].length; j++) {
        if (board[i][j] == target) {
          return new Position(i, j);
        }
      }
    }
    return null;
  }