public void keyPressed(final KeyEvent e) {
        if (e.getKeyCode() == KeyEvent.VK_LEFT)
            moveXcoord = -game.speed;
        if (e.getKeyCode() == KeyEvent.VK_RIGHT)
            moveXcoord = game.speed;
        if (e.getKeyCode() == KeyEvent.VK_UP)
            moveYcoord = -game.speed;
        if (e.getKeyCode() == KeyEvent.VK_DOWN)
            moveYcoord = game.speed;
    }