protected boolean checkForCollisionAi(int[][] tempBlock, int[][] gameTable, int tempX, int tempY) {
        clearMovingBlocks(tempBlock, 1);
        try {
            for (int i = 0; i < tempBlock.length; ++i) {
                for (int j = 0; j < tempBlock[i].length; ++j) {
                    //Testing if the block is in the bounds of gamestatus
                    if (i + tempX < gameTable.length && i + tempX > -1 && j + tempY < gameTable[0].length && tempX > -1) {
                        if (gameTable[i + tempX][j + tempY] == 1 && tempBlock[i][j] == 1) {
                            return true;
                        }
                    } else {
                        return true;
                    }
                }
            }
        } catch (IndexOutOfBoundsException e) {
            return true;
        }
        clearSolidBlocks(tempBlock, 2);
        return false;
    }