示例#1
0
        public void TestMoveToNorthShouldIncreaseY()
        {
            GridPoint originalPosition = new GridPoint(0, 0);

            var newPosition = _target.MoveFrom(originalPosition, CompassDirection.NORTH);

            Assert.IsTrue(newPosition.X == originalPosition.X);
            Assert.IsTrue(newPosition.Y == originalPosition.Y + 1);
        }
示例#2
0
文件: Robot.cs 项目: StGv/RoboWars
 public void MoveForward()
 {
     CurrentGridPosition = _arenaTerrainGrid.MoveFrom(CurrentGridPosition, CurrentCompassOrientation);
 }