private void processPlayer(int time) {
  // TODO player death
  player.tryRegen();

  if (northPressed || southPressed || westPressed || eastPressed) {
   player.setIsMoving(true);
   Rectangle[] monsterBounds = new Rectangle[map.monsters.size()];
   for (int i = 0; i < map.monsters.size(); i++) {
    monsterBounds[i] = map.monsters.get(i).getBounds();
   }
   if (northPressed) {
    map.move(player, Maze.NORTH, getDistance(player.getSpeed(), time), monsterBounds);
    player.setDirection(Maze.NORTH);
   }
   if (southPressed) {
    map.move(player, Maze.SOUTH, getDistance(player.getSpeed(), time), monsterBounds);
    player.setDirection(Maze.SOUTH);
   }
   if (westPressed) {
    map.move(player, Maze.WEST, getDistance(player.getSpeed(), time), monsterBounds);
    player.setDirection(Maze.WEST);
   }
   if (eastPressed) {
    map.move(player, Maze.EAST, getDistance(player.getSpeed(), time), monsterBounds);
    player.setDirection(Maze.EAST);
   }
  } else {
   player.setIsMoving(false);
  }

  map.checkForItems(player, this);
  calculateWindow();
 }