protected void keyReleased(int keyCode) {
    int command = InvaderGameMachine.NOCMD;
    int key = getKeyStates();

    switch (key) {
      case LEFT_PRESSED:
        command = InvaderGameMachine.LEFT;
        break;
      case RIGHT_PRESSED:
        command = InvaderGameMachine.RIGHT;
        break;
      case FIRE_PRESSED:
        command = InvaderGameMachine.FIRE;
        break;
    }

    gameWorld.command(command);

    igm.action(command);
  }
 public void commandAction(Command cmd, Displayable arg1) {
   if (cmd == exit) {
     igm.exit();
   }
 }