public void TestBishop() { var bishop = new Bishop(Color.White); var board = new Board(); board.Occupants[2, 0] = bishop; // Test nature // - If can move diagonal // - If can move straight // - If can move 1 step // - If can move multiple steps Assert.IsFalse(bishop.CheckValidMove( new Vector2Int(2, 0), new Vector2Int(2, 2), board )); Assert.IsFalse(bishop.CheckValidMove( new Vector2Int(2, 0), new Vector2Int(4, 0), board )); Assert.IsTrue(bishop.CheckValidMove( new Vector2Int(2, 0), new Vector2Int(4, 2), board )); Assert.IsFalse(bishop.CheckValidMove( new Vector2Int(2, 0), new Vector2Int(4, 1), board )); board.Occupants[3, 1] = new Pawn(Color.Black); // Test blocking Assert.IsFalse(bishop.CheckValidMove( new Vector2Int(2, 0), new Vector2Int(5, 3), board )); // Test attack Assert.IsTrue(bishop.CheckValidMove( new Vector2Int(2, 0), new Vector2Int(3, 1), board )); board.Occupants[5, 3] = new Pawn(Color.Black); board.Occupants[3, 1] = new Pawn(Color.White); Assert.IsFalse(bishop.CheckValidMove( new Vector2Int(2, 0), new Vector2Int(5, 3), board )); }