public void Default() { var sut = new GlobalDotCounter(0); sut.CanGhostLeave(GhostNickname.Blinky).Should().BeFalse(); sut.CanGhostLeave(GhostNickname.Pinky).Should().BeFalse(); sut.CanGhostLeave(GhostNickname.Clyde).Should().BeFalse(); sut.CanGhostLeave(GhostNickname.Inky).Should().BeFalse(); }
public GhostHouseDoor(int level, IMediator mediator) { _mediator = mediator; _ghostCounters = new(); _nullCounter = new(int.MaxValue, "NULL"); _globalCounter = new(); var pinkyCounter = new DotCounter(0, "PINKY"); if (level == 0) { _ghostCounters[GhostNickname.Pinky] = pinkyCounter; _ghostCounters[GhostNickname.Inky] = new(30, "INKY"); _ghostCounters[GhostNickname.Clyde] = new(60, "CLYDE"); } if (level == 1) { _ghostCounters[GhostNickname.Pinky] = pinkyCounter; _ghostCounters[GhostNickname.Inky] = new(0, "INKY"); _ghostCounters[GhostNickname.Clyde] = new(50, "CLYDE"); } if (level >= 2) { _ghostCounters[GhostNickname.Pinky] = pinkyCounter; _ghostCounters[GhostNickname.Inky] = new(0, "INKY"); _ghostCounters[GhostNickname.Clyde] = new(0, "CLYDE"); } _pillConsumptionTimeIdle = TimeSpan.Zero; _activeCounter = pinkyCounter; _activeCounter.Activate(); switchToUseCounterOfNextGhost(); }