コード例 #1
0
        public void TestAgentMoveBentLine()
        {
            string levelString = @"
++++++++++++
+ +     G  +
+0+++++++  +
+          +
++++++++++++";

            List <AgentCommand> commands = new List <AgentCommand>()
            {
                AgentCommand.CreateMove(Direction.S),
                AgentCommand.CreateMove(Direction.E),
                AgentCommand.CreateMove(Direction.E),
                AgentCommand.CreateMove(Direction.E),
                AgentCommand.CreateMove(Direction.E),
                AgentCommand.CreateMove(Direction.E),
                AgentCommand.CreateMove(Direction.E),
                AgentCommand.CreateMove(Direction.E),
                AgentCommand.CreateMove(Direction.E),
                AgentCommand.CreateMove(Direction.N),
                AgentCommand.CreateMove(Direction.N),
                AgentCommand.CreateMove(Direction.W),
            };

            VerifyMoveAgentToGoalCreator(levelString, commands);
        }
コード例 #2
0
        public void TestAgentToPullPullBent()
        {
            string levelString = @"
++++++++++++
++++0+++++++
++++ +++++++
++++ +++++++
+B       GF+
++++++++++++";

            List <AgentCommand> commands = new List <AgentCommand>()
            {
                AgentCommand.CreateMove(Direction.S),
                AgentCommand.CreateMove(Direction.S),
                AgentCommand.CreateMove(Direction.S),
                AgentCommand.CreateMove(Direction.W),
                AgentCommand.CreateMove(Direction.W),
                AgentCommand.CreatePull(Direction.E, Direction.W),
                AgentCommand.CreatePull(Direction.E, Direction.W),
                AgentCommand.CreatePull(Direction.E, Direction.W),
                AgentCommand.CreatePull(Direction.E, Direction.W),
                AgentCommand.CreatePull(Direction.E, Direction.W),
                AgentCommand.CreatePull(Direction.E, Direction.W),
                AgentCommand.CreatePull(Direction.E, Direction.W),
                AgentCommand.CreatePull(Direction.E, Direction.W),
            };

            VerifyMoveBoxToGoalCreator(levelString, commands);
        }
コード例 #3
0
        public void TestAgentToPushPushUTurn()
        {
            string levelString = @"
++++++
+  0 +
+ BFG+
++++++";

            List <AgentCommand> commands = new List <AgentCommand>()
            {
                AgentCommand.CreateMove(Direction.W),
                AgentCommand.CreatePush(Direction.S, Direction.E),
                AgentCommand.CreatePush(Direction.E, Direction.E),
            };

            VerifyMoveBoxToGoalCreator(levelString, commands);
        }
コード例 #4
0
        public void TestAgentMoveStraightPath()
        {
            string levelString = @"
++++++++++++
+          +
+0       G +
+          +
++++++++++++";

            List <AgentCommand> commands = new List <AgentCommand>()
            {
                AgentCommand.CreateMove(Direction.E),
                AgentCommand.CreateMove(Direction.E),
                AgentCommand.CreateMove(Direction.E),
                AgentCommand.CreateMove(Direction.E),
                AgentCommand.CreateMove(Direction.E),
                AgentCommand.CreateMove(Direction.E),
                AgentCommand.CreateMove(Direction.E),
                AgentCommand.CreateMove(Direction.E),
            };

            VerifyMoveAgentToGoalCreator(levelString, commands);
        }