public void TestKing() { var king = new King(Color.White); var board = new Board(); board.Occupants[3, 0] = king; Assert.IsTrue(king.CheckValidMove( new Vector2Int(3, 0), new Vector2Int(4, 0), board )); Assert.IsTrue(king.CheckValidMove( new Vector2Int(3, 0), new Vector2Int(3, 1), board )); Assert.IsTrue(king.CheckValidMove( new Vector2Int(3, 0), new Vector2Int(2, 0), board )); Assert.IsTrue(king.CheckValidMove( new Vector2Int(3, 0), new Vector2Int(4, 1), board )); Assert.IsTrue(king.CheckValidMove( new Vector2Int(3, 0), new Vector2Int(2, 1), board )); Assert.IsFalse(king.CheckValidMove( new Vector2Int(3, 0), new Vector2Int(1, 1), board )); Assert.IsFalse(king.CheckValidMove( new Vector2Int(3, 0), new Vector2Int(5, 2), board )); board.Occupants[2, 1] = new Pawn(Color.Black); board.Occupants[4, 1] = new Pawn(Color.White); Assert.IsTrue(king.CheckValidMove( new Vector2Int(3, 0), new Vector2Int(2, 1), board )); Assert.IsFalse(king.CheckValidMove( new Vector2Int(3, 0), new Vector2Int(4, 1), board )); }