public void update() 
	{
		if(game)
		{
			timer++;
			if(timer >= 30)
			{
				timer = 0;
				count++;
				if(count < Content.song.length)
				{
					if(Content.song[count].equals("NULL NULL")) {}
					else
					{
						elves.add(new Elf(Content.song[count]));
					}
				}
				else if(count > Content.song.length+3)
				{
					GSM.setState(new WinState());
				}
				JukeBox.play("Beat");
			}
			for(int i = 0; i < elves.size(); i++)
			{
				elves.get(i).update();
			}
			p.update();
			
			for(int i = 0; i < elves.size(); i++)
			{
				if(elves.get(i).getRec().intersects(p.getRec())) 
				{
					game = false;
				}
			}
		}
		else
		{
			if(Input.isPressed(KeyEvent.VK_ENTER)) { GSM.setState(new TestState());}
		}
	}