public void update(long time, Game game) {
    if((time-start) < margin*1000) {
      // Opening Margin
      // Maybe find a way to display shit here
    }
    if((time-start) > margin*1000+length*1000) {
      // Ending Margin
      if(boss == false) {
        int pattern[] = {0,3};
        float offset[] = {250,-500};
        createEnemy(time,120000,pattern,offset,3,0);
        boss = true;
      }
    }
    else {
      // Actual level time
      if(time > buffer) {
        //
        if(iterator[1] <= groups[iterator[0]].length - 1) {
          float offset[] = {groups[iterator[0]][iterator[1]][1][0],groups[iterator[0]][iterator[1]][1][1]};
          createEnemy(time,enemyLife,groups[iterator[0]][iterator[1]][0],offset,groups[iterator[0]][iterator[1]][2][1],groups[iterator[0]][iterator[1]][2][0]);
          buffer = time + enemySpace;
          iterator[1]++;
        }
        else {
          iterator[0] = (int)(Math.random()*groups.length);
          iterator[1] = 0;
          buffer = time + groupSpace;
        }
      }
    }
    updateBullets(time);
    updateEnemies(time, game);
    updatePowerups(time);
    checkCollisions(game);
    if(game.state == 2) {
      Tile tile = game.grid.getTile(7,2);
      tile.setLabel("Level", ""+game.levelNum);
      tile = game.grid.getTile(7,4);
      tile.setLabel("Life", ""+game.player.health);
      tile = game.grid.getTile(7,3);
      tile.setLabel("Score", ""+game.score);
      tile = game.grid.getTile(8,3);
      tile.setLabel("Bomb", ""+game.player.bombs);
      tile = game.grid.getTile(7,5);
      tile.setLabel("Power", ""+game.player.level);
      tile = game.grid.getTile(8,5);
      tile.setLabel("Weapon", ""+game.player.type);
    }
  }