Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong removed positions for bishops #25

Open
olufjen opened this issue Jun 1, 2021 · 1 comment
Open

Wrong removed positions for bishops #25

olufjen opened this issue Jun 1, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@olufjen
Copy link
Owner

olufjen commented Jun 1, 2021

The PreferredMove processor calculates wrong removed positions for bishops:

Theparti010621.PNG
black bishop at d6.
ChessAction: Preferred Position e5 Piece Piece position d6 X, Y (3, 5) bB d6 BISHOP ActiveName B
Available positions
Position: e5 B X, Y (4, 4)
Position: e7 B X, Y (4, 6)
Position: f8 B X, Y (5, 7) Occupied by: BlackRook2
Position: c5 B X, Y (2, 4)
Position: b4 B X, Y (1, 3)
Position: a3 B X, Y (0, 2)
Position: c7 B X, Y (2, 6) Occupied by: BlackPawn3
Position: b8 B X, Y (1, 7)
Position: h2 B X, Y (7, 1) Occupied by: WhitePawn8
Position: g3 B X, Y (6, 2)
Position: f4 B X, Y (5, 3)
Removed positions
Position: f8 B X, Y (5, 7) Occupied by: BlackRook2
Position: c7 B X, Y (2, 6) Occupied by: BlackPawn3
Position: h2 B X, Y (7, 1) Occupied by: WhitePawn8
Position: g3 B X, Y (6, 2)
Position: b4 B X, Y (1, 3)
Position: a3 B X, Y (0, 2)
Position: b8 B X, Y (1, 7)

Piece name WhiteBishop2
r11q1rk1/ppp11ppp/11nb1n11/111p1111/111P11b1/11NBPN1P/PP111PP1/R1BQ1RK1
Piece position d3 X, Y (3, 2) wB d3 BISHOP ActiveName B
Available positions
Position: c4 W X, Y (2, 3)
Position: b5 W X, Y (1, 4)
Position: a6 W X, Y (0, 5)
Position: f1 W X, Y (5, 0) Occupied by: WhiteRook2
Position: e2 W X, Y (4, 1)
Position: e4 W X, Y (4, 3)
Position: f5 W X, Y (5, 4)
Position: g6 W X, Y (6, 5)
Position: h7 W X, Y (7, 6) Occupied by: BlackPawn8
Position: c2 W X, Y (2, 1)
Position: b1 W X, Y (1, 0)
Removed positions
Position: f1 W X, Y (5, 0) Occupied by: WhiteRook2
Position: g6 W X, Y (6, 5)
Position: h7 W X, Y (7, 6) Occupied by: BlackPawn8

@olufjen olufjen added the bug Something isn't working label Jun 1, 2021
@olufjen
Copy link
Owner Author

olufjen commented Jun 7, 2021

Moves white bishop to d3 before pawn at f2 has been moved

Piece name WhiteBishop2
rnbqkbnr/pppppppp/11111111/11111111/111P1111/11111111/PPP1PPPP/RNBQKBNR
Piece position f1 X, Y (5, 0) wB f1 BISHOP ActiveName B
Available positions
Position: c4 W X, Y (2, 3)
Position: b5 W X, Y (1, 4)
Position: a6 W X, Y (0, 5)
Position: g2 W X, Y (6, 1) Occupied by: WhitePawn7
Position: h3 W X, Y (7, 2)
Position: e2 W X, Y (4, 1) Occupied by: WhitePawn5
Position: d3 W X, Y (3, 2)
Removed positions
Position: g2 W X, Y (6, 1) Occupied by: WhitePawn7
Position: e2 W X, Y (4, 1) Occupied by: WhitePawn5
Position: c4 W X, Y (2, 3)
Position: b5 W X, Y (1, 4)
Position: a6 W X, Y (0, 5)
Northwest positions
X, Y (4, 1) X, Y (3, 2) X, Y (2, 3) X, Y (1, 4) X, Y (0, 5)
Northeast positions
X, Y (6, 1) X, Y (7, 2)
Southeast positions

Positions d3 and h3 not removed!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant