public void gameLoop() {
        //Main game Loop of the game
        boolean pieceFree = true;
        while (true) {
            if (!isSpawnFree()) {
                System.out.println("\n\n\n\n GAME OVER \n\n\n");
                this.grid.fireGameOver();
                break;
            } else {
                grid.spawnPiece();
                while (pieceFree) {
                    if (!_gameState) {
                        try {
                            synchronized (this) {
                                wait();
                            }
                        } catch (InterruptedException ex) {
                            Logger.getLogger(TetrisCore.class.getName()).log(Level.SEVERE, null, ex);
                        }
                    }
                    try {
                        Thread.currentThread().sleep((long) getTempo());
                    } catch (InterruptedException ex) {
                        Thread.currentThread().interrupt();
                        break;
                    }
                    pieceFree = this.grid.isDownable();
                    if (pieceFree) {
                        this.grid.getCurrentPiece().setPosition(this.grid.getCurrentPiece().getPosition().getDownPosition());
                        this.grid.fireUpdatedGrid(grid.getColorTab(true));
                    }
                }
                this.grid.fixPiece();
                getInfo().updateScore(grid.destroyLines());
                updateSpeed();
                this.nextPiece();
                pieceFree = true;
            }
        }
    }