@Override
    public void keyPressed(KeyEvent e) {
        if (e.getKeyCode() == KeyEvent.VK_UP) {
            gui.getPhysics().getShip().setAccelerating(true);
        }
        if (e.getKeyCode() == KeyEvent.VK_DOWN) {
            gui.getPhysics().getShip().setDecelerating(true);
        }
        if (e.getKeyCode() == KeyEvent.VK_LEFT) {
            gui.getPhysics().getShip().setTurningAntiClockwise(true);
        }
        if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
            gui.getPhysics().getShip().setTurningClockwise(true);
        }
        if (e.getKeyCode() == KeyEvent.VK_SPACE) {
            if (System.currentTimeMillis() - lastPressed > 250) {
                gui.getPhysics().shoot();
                lastPressed = System.currentTimeMillis();
            }
        }
    }