Code example for Queue

Methods: add, peek, poll

0
	private void quit() { 
		startActivity(new Intent(getApplicationContext(), MainActivity.class));
	} 
 
	private void updateHero() { 
		hiv.setImageResource(queue.peek().getDrawable());
		htv.setText(queue.peek().printOut());
	} 
	 
	private void doNothing() { 
		queue.add(queue.poll());
		updateHero(); 
	} 
 
	private void attack() { 
		Log.i("COMBAT", "in attack");
		e1.setClickable(true);
		e2.setClickable(true);
		e3.setClickable(true);
		e4.setClickable(true);
		Toast.makeText(getApplicationContext(), "Click the enemy you want to attack", Toast.LENGTH_SHORT).show();