package jp.ac.nii.icpc2010.players;

import jp.ac.nii.icpc2010.players.RandomPlayer;
import jp.ac.nii.icpc2010.playfield.FieldDirection;
import jp.ac.nii.icpc2010.playfield.IPlayField;

/** 
 * Malicious agent that uses a lot of CPU
 * @author johan
 *
 */
public class CPUDrainer extends RandomPlayer {

	public CPUDrainer(int id, IPlayField playField) {
		super(id, playField);
		// TODO Auto-generated constructor stub
	}

	@Override
	public FieldDirection getInput() {
		int x = 0;
		while (getRemainingTime() > -500) {
			for (int i = 0; i < 10000; ++i) {

				x = (int) (i * Math.random());

			}			
		}

		return super.getInput();
	}	
}
