public void keyPressed(KeyEvent e) 
    {
        int key = e.getKeyCode();
        if(key == 32) 
        {
            int n = 8;
            if (mode == 0) 
            {
                n = 10;
            }
            if (mode == 1) 
            {
                n = 8;
            }
            if (mode == 2) 
            {
                n = 6;
            }
            if (mode == 3) 
            {
                n = 4;
            }
            fire(n);
        }
        
        ImageIcon ii;
        
        if(key == 37) 
        {
            if(mode == 3)
            {
                dx = -2;
            }
            else 
            {
                dx = -1;
            }
            
            ii     = new ImageIcon(this.getClass().getResource("Assets/Images/craftLeft.png"));
            image  = ii.getImage();
            width  = this.image.getWidth(null);
            height = this.image.getHeight(null);
        }
        if (key == 39)
        {
            if (this.mode == 3) 
            {
                dx = 2;
            }
            else 
            {
                dx = 1;
            }
            ii          = new ImageIcon(this.getClass().getResource("Assets/Images/craft.png"));
            this.image  = ii.getImage();
            this.width  = this.image.getWidth(null);
            this.height = this.image.getHeight(null);
        }
        if (key == 38) 
        {
            if (mode == 3) 
            {
                dy = -2;
            }
            else 
            {
                dy = -1;
            }
            ii     = new ImageIcon(this.getClass().getResource("Assets/Images/craftUp.png"));
            image  = ii.getImage();
            width  = this.image.getWidth(null);
            height = this.image.getHeight(null);
        }
        if (key == 40) 
        {
            if (mode == 3) 
            {
                dy = 2;
            }
            else 
            {
                dy = 1;
            }
            ii     = new ImageIcon(this.getClass().getResource("Assets/Images/craftDown.png"));
            image  = ii.getImage();
            width  = this.image.getWidth(null);
            height = this.image.getHeight(null);
        }
        if (key == 82) 
        {
            Laststand.Laststand.reset();
        }
    }