public SmartCPUBehaviour(IGrid grid, ISetting setting, CPUMode difficulty) { _grid = grid; _gridSimulator = new GridSimulator(grid, setting); _outputter = new OutputBestMovement(_gridSimulator); _grid.OnGroupAdd += new OnGroupAddEventHandler(OnGroupAddEvent); Debug.Log("difficulty " + difficulty + "set"); switch (difficulty) { case CPUMode.Easy: timeBeforeAction = 0.5f; timeBetweenActions = 0.5f; break; case CPUMode.Normal: timeBeforeAction = 0.5f; timeBetweenActions = 0.3f; break; case CPUMode.Hard: timeBeforeAction = 0.2f; timeBetweenActions = 0.1f; break; case CPUMode.Kusotuyo: timeBeforeAction = 0f; timeBetweenActions = 0f; break; } }
public SmartCPUBehaviour(IGrid grid, ISetting setting, CPUMode difficulty) { _grid = grid; _gridSimulator = new GridSimulator(grid, setting); _outputter = new OutputBestMovement(_gridSimulator); _grid.OnGroupAdd += new OnGroupAddEventHandler(OnGroupAddEvent); Debug.Log("difficulty " + difficulty + "set"); switch(difficulty) { case CPUMode.Easy: timeBeforeAction = 0.5f; timeBetweenActions = 0.5f; break; case CPUMode.Normal: timeBeforeAction = 0.5f; timeBetweenActions = 0.3f; break; case CPUMode.Hard: timeBeforeAction = 0.2f; timeBetweenActions = 0.1f; break; case CPUMode.Kusotuyo: timeBeforeAction = 0f; timeBetweenActions = 0f; break; } }