public void PawnTwoCellsNot() { var from = new Position("a3"); var to = new Position("a5"); var s = new ChessState(); s[from] = new ChessPiece { Player = new Player(1) }; var m = new PawnMoveTemplate(); Assert.IsFalse(m.CanApply(from, to, s)); }
public void PawnUp() { var from = new Position("a2"); var to = new Position("a3"); var s = new ChessState(); s[from] = new ChessPiece {Player = new Player(1)}; var m = new PawnMoveTemplate(); Assert.IsTrue(m.CanApply(from,to,s)); }
public void PawnTwoCellsBlack() { var from = new Position("a7"); var to = new Position("a5"); var s = new ChessState(); s[from] = new ChessPiece { Player = new Player(2) }; var m = new PawnMoveTemplate(); Assert.IsTrue(m.CanApply(from, to, s)); }