private boolean check(int[][] coordinates) {
        for(int i=0;i<4;i++) {
            if (coordinates[i][0]<0 || coordinates[i][0]>=board.getNumberOfRows()) return false;
            if (coordinates[i][1]<0 || coordinates[i][1]>=board.getNumberOfColumns()) return false;
            if (board.getCell(coordinates[i][0],coordinates[i][1])) return false;
        }
        return true;
    }