示例#1
0
 public void Go()
 {
     player.speed = 3;
     player.MoveRight();
     Assert.AreEqual(Map.mapWidth / 2 * Map.mapCell + 3, player.locationX);
     SetUp();
     player.MoveLeft();
     Assert.AreEqual(Map.mapWidth / 2 * Map.mapCell - 3, player.locationX);
     SetUp();
     player.MoveDown();
     Assert.AreEqual(Map.mapWidth / 2 * Map.mapCell + 3, player.locationY);
     SetUp();
     player.MoveUp();
     Assert.AreEqual(Map.mapWidth / 2 * Map.mapCell - 3, player.locationY);
     player = new Woodman(Map.mapWidth / 2 * Map.mapCell, Map.mapWidth / 2 * Map.mapCell);
 }
示例#2
0
 public void SetUp()
 {
     player = new Woodman(Map.mapWidth / 2 * Map.mapCell, Map.mapWidth / 2 * Map.mapCell);
 }