public PredictGhost(Ghosts.Ghost ghost, GameState gs) : base(ghost.Node, ghost.Direction) { if (ghost.Entered) { this.Chasing = (ghost.Chasing || ghost.RemainingFlee < 200); } else { this.Chasing = false; this.Node = gs.Map.Nodes[13, 11]; this.Direction = Direction.Up; } switch (ghost.Name) { case "Red": Danger = GhostDanger.Red; break; case "Blue": Danger = GhostDanger.Blue; break; case "Pink": Danger = GhostDanger.Pink; break; case "Brown": Danger = GhostDanger.Brown; break; } }
public PredictGhost(Node node, Direction direction, GhostDanger danger, bool chasing) : base(node, direction) { this.Chasing = chasing; this.Danger = danger; }