コード例 #1
0
        public GreyWorm(Communicator communicator, Settings settings)
        {
            _communicator = communicator;
            _settings     = settings;

            _level = new Level();

            var blockEnemy     = new BlockEnemy(settings.DontBlock);
            var gotoApple      = new GotoApple(blockEnemy);
            var gotoCenter     = new GotoCenter(gotoApple);
            var avoidCollosion = new AvoidCollosion(gotoCenter, settings.FillGiveUpLimit);

            _decider = avoidCollosion;
        }
コード例 #2
0
 public ComputerNeverLose(Symbol symbol, string name, IMoveDecider moveDecider) : base(symbol, name)
 {
     _moveDecider = moveDecider;
 }
コード例 #3
0
ファイル: AvoidCollosion.cs プロジェクト: jypa/GreyWorm
 public AvoidCollosion(IMoveDecider another, int fillGiveUpLimit)
 {
     _another         = another;
     _fillGiveUpLimit = fillGiveUpLimit;
 }
コード例 #4
0
 public GotoCenter(IMoveDecider another)
 {
     _another = another;
 }
コード例 #5
0
 public GotoApple(IMoveDecider another)
 {
     _another = another;
 }