boolean NORTH, SOUTH, ROTATEL, ROTATER;

// Julia, Max
void keyPressed() {
  if (key == CODED) {
    if(keyCode == UP) {
        NORTH = true;
        if(!idle_motor.isPlaying()) idle_motor.play();
    } else if (keyCode == DOWN) {
      SOUTH = true;
    } else if (keyCode == LEFT) {
        ROTATEL = true;
    } else if (keyCode == RIGHT) {
        ROTATER = true;
    }
  } else if (key == 's') { // SAW
    if (ship_zero.hasSaw) {
      Log target_log = logs[ship_zero.nextLog];
      if(checkDistance(target_log, ship_zero) < 40) {
        target_log.sawed = true;
        stats_menu.trees_sawed = stats_menu.trees_sawed + 1;
        }
    }
    // Marla
    // Pause menu
  } else if (keyCode == ESC){
    key = 0;
    if (isgame) {
        isgame = false;
        ispause = true;
    }
  }
}

// Julia
void keyReleased() {
  if(keyCode == UP) {NORTH = false; }
  else if (keyCode == DOWN) SOUTH = false;
  else if (keyCode == LEFT) {ROTATEL = false; } 
  else if (keyCode == RIGHT) {ROTATER = false; } 
}

boolean mouse_released = false;
void mouseReleased() {
  mouse_released = true;
}
