public void keyPressed(KeyEvent e) {
        int key = e.getKeyCode();
        int direction = 0;
        Car c = null;
        
        switch (key) {
        case KeyEvent.VK_UP:
        	c = context.car1;
        	direction = 1;
        	break;
        case KeyEvent.VK_DOWN:
        	c = context.car1;
        	direction = 2;
        	break;
        case KeyEvent.VK_LEFT:
        	c = context.car1;
        	direction = 3;
        	break;
        case KeyEvent.VK_RIGHT:
        	c = context.car1;
        	direction = 4;
        	break;
        case KeyEvent.VK_W:
        	c = context.car2;
        	direction = 1;
        	break;
        case KeyEvent.VK_S:
        	c = context.car2;
        	direction = 2;
        	break;
        case KeyEvent.VK_A:
        	c = context.car2;
        	direction = 3;
        	break;
        case KeyEvent.VK_D:
        	c = context.car2;
        	direction = 4;
        	break;
        }
        if (c != null) 
          c.keyPress(direction);
	}