@Override

        //Controls the MainCharacterFigure's movement based on user input from the arrow keys
        public void keyPressed(KeyEvent e) {
            // TODO Auto-generated method stub
            if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
                System.exit(0);
            } else if (e.getKeyCode() == KeyEvent.VK_UP) {
							if (dyMC >= -560) {
								dyMC -= 4;
							}
							repaint();
            	} else if (e.getKeyCode() == KeyEvent.VK_DOWN) {
								if (dyMC <= 0) {
									dyMC += 4;
								}
								repaint();
            	} else if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
								if (dxMC <= 230) {
									dxMC += 4;
								}
								repaint();
            	} else if (e.getKeyCode() == KeyEvent.VK_LEFT) {
								if (dxMC >= -230) {
									dxMC -= 4;
								}
								repaint();
            }
  			}