Exemple #1
0
        public void SetMoveStrategy(IMoveAlgorithm strategy)
        {
            var oldStrategy = MoveStrategy == null ? "Nothing" : MoveStrategy.GetType().Name;
            var newStrategy = strategy == null ? "Nothing" : strategy.GetType().Name;

            Console.WriteLine("Switching move strategy from {0} to {1}", oldStrategy, newStrategy);
            MoveStrategy = strategy;
        }
Exemple #2
0
 public Player(IMoveAlgorithm iMoveAlgorithm)
 {
     this.direction = iMoveAlgorithm;
 }