Exemplo n.º 1
0
 public void TemplateMovePathCheck()
 {
     var m = new MockTemplate(null, null, true);
     var s = new GameState(5, 5);
     s[new Position(3, 4)] = new Piece();
     Assert.IsFalse(m.CanApply(new Position(3, 3), new Position(3, 5), s));
 }
Exemplo n.º 2
0
 public void TemplateMoveNoRestrictions()
 {
     var m = new MockTemplate();
     var s = new GameState(5, 5);
     Assert.IsTrue(m.CanApply(new Position(3, 3), new Position(1, 2), s));
 }
Exemplo n.º 3
0
 public void TemplateMoveNotCapture()
 {
     var m = new MockTemplate(null, false);
     var s = new GameState(5, 5);
     s[new Position(5, 5)] = new Piece();
     Assert.IsFalse(m.CanApply(new Position(3, 3), new Position(5, 5), s));
     Assert.IsTrue(m.CanApply(new Position(3, 3), new Position(4, 4), s));
 }
Exemplo n.º 4
0
 public void TemplateMoveNoMaxLength()
 {
     var m = new MockTemplate(null);
     var s = new GameState(5, 5);
     Assert.IsTrue(m.CanApply(new Position(3, 3), new Position(3, 4), s));
     Assert.IsTrue(m.CanApply(new Position(3, 3), new Position(3, 5), s));
 }