private boolean checkDirection(GameBoard gb, int player, Coordinates coord, int x, int y) {
        try {
            Coordinates newCoord = new Coordinates(coord.getRow() + x, coord.getCol() + y);
            if (gb.getOccupation(newCoord) == EMPTY) {
                return false;
            }
            if (gb.getOccupation(coord) == reversi.Utils.other(player) && gb.getOccupation(newCoord) == player) {
                return true;
            }
            if (gb.getOccupation(newCoord) == reversi.Utils.other(player)) {
                return checkDirection(gb, player, newCoord, x, y);
            }
        } catch (OutOfBoundsException e) {
            return false;
        }
        return false;
    }