package jp.ac.nii.icpc2010.players;

import java.util.Random;

import jp.ac.nii.icpc2010.manager.OptionsManager;
import jp.ac.nii.icpc2010.players.AbstractPlayer;
import jp.ac.nii.icpc2010.playfield.FieldDirection;
import jp.ac.nii.icpc2010.playfield.IPlayField;

// for TimeKeeper debugging.
public class SleepyPlayer extends AbstractPlayer{
	public SleepyPlayer(int id, IPlayField playField) {
		super(id, playField);
		try {
			Thread.sleep((long)(Math.abs(r.nextGaussian()) * /*(((OptionsManager)basicOptions).getInitTimeout())*/ 3000 / 1.5));
			//option is replaced with constant number
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}

	Random r = new Random();

	public FieldDirection getInput(){

		try {
			Thread.sleep((long)(Math.abs(r.nextGaussian()) * /*basicOptions.getRunTimeout()*/ 250 / 2.0));
			//option is replaced with constant number
		} catch (InterruptedException e) {
			e.printStackTrace();
		}

		return FieldDirection.Up;
	}
}
