예제 #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);
        }