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; } }
public void InitializeGridSimulator() { blockPattern = Substitute.For<IBlockPattern>(); blockTypeMock = new BlockType[] { BlockType.One, BlockType.Six, BlockType.Three, BlockType.Five, }; blockPattern.Types.Returns(blockTypeMock); group = groupFactory.Create(setting, blockPattern, groupPattern); gridSimulator = new GridSimulator(grid, setting); }
public void InitializeGridSimulator() { blockPattern = Substitute.For <IBlockPattern>(); blockTypeMock = new BlockType[] { BlockType.One, BlockType.Six, BlockType.Three, BlockType.Five, }; blockPattern.Types.Returns(blockTypeMock); group = groupFactory.Create(setting, blockPattern, groupPattern); gridSimulator = new GridSimulator(grid, setting); }
public OutputBestMovement(IGridSimulator simulator) { _simulator = simulator; }