maemo.org Bugzilla – Bug 12357
Castling does not work
Last modified: 2011-09-18 07:56:28 UTC
You need to log in before you can comment on or make changes to this bug.
SOFTWARE VERSION: master-branch (2011-08-28) EXACT STEPS LEADING TO PROBLEM: 0. Make sure that two N9(50)s are connected to FICS. 1. Start playing a game on FICS using the white pieces 2. play until castling (O-O) is possible 3. try to do castling by taping on the Kings's field and after this tap two fields right (White: g1). EXPECTED OUTCOME: King is moving to g1 and the Rook moves to f1. Black is able to do the next move ACTUAL OUTCOME: King moves to g1. Both players are unable to do something. The tapped square always gets red. REPRODUCIBILITY: always
Working on this one now.
Should be fixed with 8115e64edd07254c6f5fc710b6ee2e37fe5c5c34
Castling is still impossible. But the outcome is slightly different: EXACT STEPS LEADING TO PROBLEM: 0. Make sure that two N9(50)s are connected to FICS. 1. Start playing a game on FICS using the white pieces 2. play until castling (O-O) is possible 3. try to do castling by taping on the Kings's field and after this tap two fields right (White: g1). EXPECTED OUTCOME: King is moving to g1 and the Rook moves to f1. Black is able to do the next move ACTUAL OUTCOME: King moves to g1. Rook does _not_ move. Black is able to do the next move
(In reply to comment #3) > ACTUAL OUTCOME: > King moves to g1. Rook does _not_ move. > Black is able to do the next move With a connection to FICS, this *would* update with the next FICS response.
Position now updates king + rook after castling. Note how no validation takes place though. Fixed with dd2e66882db873a6ab98539b4bcf6f4d5d89dd4a.
Tested the 4 castling combinations in testing mode and indeed they work as expected. As mikhas comments there is no prior validation but this belongs to Bug 12364 - Frontend allows illegal moves in general Verifying.
Sorry reopening. I just played a real game with someone at FICS and the game got stuck after he made a castling. Here you have all the logs, just in case it is useful to follow all the moves. Of course the saucy bit is at the end: Turn started for GuestDBSS. FICS: "" FICS: "<12> rnbqkbnr pppppppp -------- -------- -------- -------- PPPPPPPP RNBQKBNR W -1 1 1 1 1 0 318 GuestDBSS GuestDRLX -1 2 12 39 39 120 120 1 none (0:00) none 1 0 0" void Game::Position::addPiece(const Game::Piece&) Refusing to add invalid piece to position. FICS: "fics% " FICS: "<12> rnbqkbnr pppppppp -------- -------- ----P--- -------- PPPP-PPP RNBQKBNR B 4 1 1 1 1 0 318 GuestDBSS GuestDRLX 1 2 12 39 39 120 120 1 P/e2-e4 (0:00) e4 1 0 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "e2e4" Turn started for GuestDRLX. Turn started for GuestDBSS. void Game::Frontend::Miniature::confirmMove() move confirmed ... virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::AbstractEngine*) "c7c5" FICS: "fics% " FICS: "<12> rnbqkbnr pp-ppppp -------- --p----- ----P--- -------- PPPP-PPP RNBQKBNR W 2 1 1 1 1 0 318 GuestDBSS GuestDRLX -1 2 12 39 39 120 120 2 P/c7-c5 (0:00) c5 1 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "c7c5" Turn started for GuestDBSS. Turn started for GuestDRLX. FICS: "fics% " FICS: "<12> rnbqkbnr pp-ppppp -------- --p----- ----P--- --N----- PPPP-PPP R-BQKBNR B -1 1 1 1 1 1 318 GuestDBSS GuestDRLX 1 2 12 39 39 129 120 2 N/b1-c3 (0:03) Nc3 1 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "b1c3" Turn started for GuestDBSS. void Game::Frontend::Miniature::confirmMove() move confirmed ... virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::AbstractEngine*) "d7d6" FICS: "fics% " FICS: "<12> rnbqkbnr pp--pppp ---p---- --p----- ----P--- --N----- PPPP-PPP R-BQKBNR W -1 1 1 1 1 0 318 GuestDBSS GuestDRLX -1 2 12 39 39 129 126 3 P/d7-d6 (0:06) d6 1 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "d7d6" Turn started for GuestDBSS. FICS: "fics% " FICS: "<12> rnbqkbnr pp--pppp ---p---- --pN---- ----P--- -------- PPPP-PPP R-BQKBNR B -1 1 1 1 1 1 318 GuestDBSS GuestDRLX 1 2 12 39 39 134 126 3 N/c3-d5 (0:07) Nd5 1 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "c3d5" Turn started for GuestDRLX. Turn started for GuestDBSS. void Game::Frontend::Miniature::confirmMove() move confirmed ... virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::AbstractEngine*) "e7e6" FICS: "fics% " FICS: "<12> rnbqkbnr pp---ppp ---pp--- --pN---- ----P--- -------- PPPP-PPP R-BQKBNR W -1 1 1 1 1 0 318 GuestDBSS GuestDRLX -1 2 12 39 39 134 124 4 P/e7-e6 (0:14) e6 1 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "e7e6" Turn started for GuestDBSS. FICS: "fics% " FICS: "<12> rnbqkbnr pp---ppp ---pp--- --p----- ----P--- --N----- PPPP-PPP R-BQKBNR B -1 1 1 1 1 1 318 GuestDBSS GuestDRLX 1 2 12 39 39 139 124 4 N/d5-c3 (0:07) Nc3 1 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "d5c3" Turn started for GuestDRLX. Turn started for GuestDBSS. void Game::Frontend::Miniature::confirmMove() move confirmed ... virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::AbstractEngine*) "g8f6" FICS: "fics% " FICS: "<12> rnbqkb-r pp---ppp ---ppn-- --p----- ----P--- --N----- PPPP-PPP R-BQKBNR W -1 1 1 1 1 2 318 GuestDBSS GuestDRLX -1 2 12 39 39 139 122 5 N/g8-f6 (0:13) Nf6 1 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "g8f6" Turn started for GuestDBSS. FICS: "fics% " FICS: "<12> rnbqkb-r pp---ppp ---ppn-- --p----- ----P--- --N--N-- PPPP-PPP R-BQKB-R B -1 1 1 1 1 3 318 GuestDBSS GuestDRLX 1 2 12 39 39 148 122 5 N/g1-f3 (0:04) Nf3 1 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "g1f3" Turn started for GuestDRLX. Turn started for GuestDBSS. void Game::Frontend::Miniature::confirmMove() move confirmed ... virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::AbstractEngine*) "f8e7" FICS: "fics% " FICS: "<12> rnbqk--r pp--bppp ---ppn-- --p----- ----P--- --N--N-- PPPP-PPP R-BQKB-R W -1 1 1 1 1 4 318 GuestDBSS GuestDRLX -1 2 12 39 39 148 125 6 B/f8-e7 (0:09) Be7 1 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "f8e7" Turn started for GuestDBSS. FICS: "fics% " FICS: "<12> rnbqk--r pp--bppp ---ppn-- -Bp----- ----P--- --N--N-- PPPP-PPP R-BQK--R B -1 1 1 1 1 5 318 GuestDBSS GuestDRLX 1 2 12 39 39 154 125 6 B/f1-b5 (0:05) Bb5+ 1 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "f1b5" Turn started for GuestDRLX. Turn started for GuestDBSS. void Game::Frontend::Miniature::confirmMove() move confirmed ... virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::AbstractEngine*) "c8d7" FICS: "fics% " FICS: "<12> rn-qk--r pp-bbppp ---ppn-- -Bp----- ----P--- --N--N-- PPPP-PPP R-BQK--R W -1 1 1 1 1 6 318 GuestDBSS GuestDRLX -1 2 12 39 39 154 122 7 B/c8-d7 (0:15) Bd7 1 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "c8d7" Turn started for GuestDBSS. FICS: "fics% " FICS: "<12> rn-qk--r pp-Bbppp ---ppn-- --p----- ----P--- --N--N-- PPPP-PPP R-BQK--R B -1 1 1 1 1 0 318 GuestDBSS GuestDRLX 1 2 12 39 36 161 122 7 B/b5-d7 (0:05) Bxd7+ 1 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "b5d7" Turn started for GuestDRLX. Turn started for GuestDBSS. void Game::Frontend::Miniature::confirmMove() move confirmed ... virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::AbstractEngine*) "d8d7" FICS: "fics% " FICS: "<12> rn--k--r pp-qbppp ---ppn-- --p----- ----P--- --N--N-- PPPP-PPP R-BQK--R W -1 1 1 1 1 0 318 GuestDBSS GuestDRLX -1 2 12 36 36 161 124 8 Q/d8-d7 (0:10) Qxd7 1 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "d8d7" Turn started for GuestDBSS. FICS: "fics% " FICS: "<12> rn--k--r pp-qbppp ---ppn-- --p----- ----P--- --N--N-- PPPP-PPP R-BQ-RK- B -1 0 0 1 1 1 318 GuestDBSS GuestDRLX 1 2 12 36 36 137 124 8 o-o (0:36) O-O 1 1 0" void Game::Position::addPiece(const Game::Piece&) Refusing to add invalid piece to position.
Seems to be fully reproducible. I just tried with a second game, with the same unhappy ending: Turn started for GuestQQJN. FICS: "" FICS: "<12> rnbqkbnr pppppppp -------- -------- -------- -------- PPPPPPPP RNBQKBNR W -1 1 1 1 1 0 232 GuestQQJN GuestBVCJ 1 5 0 39 39 300 300 1 none (0:00) none 0 0 0" void Game::Position::addPiece(const Game::Piece&) Refusing to add invalid piece to position. Turn started for GuestBVCJ. void Game::Frontend::Miniature::confirmMove() move confirmed ... virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::AbstractEngine*) "e2e4" FICS: "fics% " FICS: "<12> rnbqkbnr pppppppp -------- -------- ----P--- -------- PPPP-PPP RNBQKBNR B 4 1 1 1 1 0 232 GuestQQJN GuestBVCJ -1 5 0 39 39 300 300 1 P/e2-e4 (0:00) e4 0 0 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "e2e4" Turn started for GuestBVCJ. FICS: "fics% " FICS: "<12> rnbqkbnr pp-ppppp -------- --p----- ----P--- -------- PPPP-PPP RNBQKBNR W 2 1 1 1 1 0 232 GuestQQJN GuestBVCJ 1 5 0 39 39 300 300 2 P/c7-c5 (0:00) c5 0 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "c7c5" Turn started for GuestQQJN. Turn started for GuestBVCJ. void Game::Frontend::Miniature::confirmMove() move confirmed ... virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::AbstractEngine*) "g1f3" FICS: "fics% " FICS: "<12> rnbqkbnr pp-ppppp -------- --p----- ----P--- -----N-- PPPP-PPP RNBQKB-R B -1 1 1 1 1 1 232 GuestQQJN GuestBVCJ -1 5 0 39 39 294 300 2 N/g1-f3 (0:06) Nf3 0 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "g1f3" Turn started for GuestBVCJ. FICS: "fics% " FICS: "<12> r-bqkbnr pp-ppppp --n----- --p----- ----P--- -----N-- PPPP-PPP RNBQKB-R W -1 1 1 1 1 2 232 GuestQQJN GuestBVCJ 1 5 0 39 39 294 299 3 N/b8-c6 (0:01) Nc6 0 1 162" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "b8c6" Turn started for GuestQQJN. Turn started for GuestBVCJ. void Game::Frontend::Miniature::confirmMove() move confirmed ... virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::AbstractEngine*) "d2d4" FICS: "fics% " FICS: "<12> r-bqkbnr pp-ppppp --n----- --p----- ---PP--- -----N-- PPP--PPP RNBQKB-R B 3 1 1 1 1 0 232 GuestQQJN GuestBVCJ -1 5 0 39 39 292 299 3 P/d2-d4 (0:02) d4 0 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "d2d4" Turn started for GuestBVCJ. FICS: "fics% " FICS: "<12> r-bqkbnr pp--pppp --n----- --pp---- ---PP--- -----N-- PPP--PPP RNBQKB-R W 3 1 1 1 1 0 232 GuestQQJN GuestBVCJ 1 5 0 39 39 292 297 4 P/d7-d5 (0:01) d5 0 1 246" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "d7d5" Turn started for GuestQQJN. Turn started for GuestBVCJ. void Game::Frontend::Miniature::confirmMove() move confirmed ... virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::AbstractEngine*) "e4d5" FICS: "fics% " FICS: "<12> r-bqkbnr pp--pppp --n----- --pP---- ---P---- -----N-- PPP--PPP RNBQKB-R B -1 1 1 1 1 0 232 GuestQQJN GuestBVCJ -1 5 0 39 38 284 297 4 P/e4-d5 (0:07) exd5 0 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "e4d5" Turn started for GuestBVCJ. FICS: "fics% " FICS: "<12> r-b-kbnr pp--pppp --n----- --pq---- ---P---- -----N-- PPP--PPP RNBQKB-R W -1 1 1 1 1 0 232 GuestQQJN GuestBVCJ 1 5 0 38 38 284 296 5 Q/d8-d5 (0:02) Qxd5 0 1 161" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "d8d5" Turn started for GuestQQJN. Turn started for GuestBVCJ. void Game::Frontend::Miniature::confirmMove() move confirmed ... virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::AbstractEngine*) "b1c3" FICS: "fics% " FICS: "<12> r-b-kbnr pp--pppp --n----- --pq---- ---P---- --N--N-- PPP--PPP R-BQKB-R B -1 1 1 1 1 1 232 GuestQQJN GuestBVCJ -1 5 0 38 38 281 296 5 N/b1-c3 (0:04) Nc3 0 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "b1c3" Turn started for GuestBVCJ. FICS: "fics% " FICS: "<12> r-b-kbnr pp--pppp --n-q--- --p----- ---P---- --N--N-- PPP--PPP R-BQKB-R W -1 1 1 1 1 2 232 GuestQQJN GuestBVCJ 1 5 0 38 38 281 293 6 Q/d5-e6 (0:03) Qe6+ 0 1 169" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "d5e6" Turn started for GuestQQJN. Turn started for GuestBVCJ. void Game::Frontend::Miniature::confirmMove() move confirmed ... virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::AbstractEngine*) "d4d5" Turn started for GuestQQJN. FICS: "fics% Illegal move (d4d5)." virtual void Game::Command::InvalidMove::exec(Game::Dispatcher*, Game::Frontend::Miniature*) virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "d5e6" FICS: "" FICS: "<12> r-b-kbnr pp--pppp --n-q--- --p----- ---P---- --N--N-- PPP--PPP R-BQKB-R W -1 1 1 1 1 2 232 GuestQQJN GuestBVCJ 1 5 0 38 38 275 293 6 Q/d5-e6 (0:03) Qe6+ 0 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "d5e6" Turn started for GuestBVCJ. void Game::Frontend::Miniature::confirmMove() move confirmed ... virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::AbstractEngine*) "f1e2" Turn started for GuestBVCJ. FICS: "fics% " FICS: "<12> r-b-kbnr pp--pppp --n-q--- --p----- ---P---- --N--N-- PPP-BPPP R-BQK--R B -1 1 1 1 1 3 232 GuestQQJN GuestBVCJ -1 5 0 38 38 270 293 6 B/f1-e2 (0:10) Be2 0 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "f1e2" FICS: "fics% " FICS: "<12> r-b-kbnr pp--pppp ----q--- --p----- ---n---- --N--N-- PPP-BPPP R-BQK--R W -1 1 1 1 1 0 232 GuestQQJN GuestBVCJ 1 5 0 37 38 270 289 7 N/c6-d4 (0:04) Nxd4 0 1 162" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "c6d4" Turn started for GuestQQJN. Turn started for GuestBVCJ. void Game::Frontend::Miniature::confirmMove() move confirmed ... virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::AbstractEngine*) "f3d4" FICS: "fics% " FICS: "<12> r-b-kbnr pp--pppp ----q--- --p----- ---N---- --N----- PPP-BPPP R-BQK--R B -1 1 1 1 1 0 232 GuestQQJN GuestBVCJ -1 5 0 37 35 262 289 7 N/f3-d4 (0:08) Nxd4 0 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "f3d4" Turn started for GuestBVCJ. FICS: "fics% " FICS: "<12> r-b-kbnr pp--pppp ----q--- -------- ---p---- --N----- PPP-BPPP R-BQK--R W -1 1 1 1 1 0 232 GuestQQJN GuestBVCJ 1 5 0 34 35 262 287 8 P/c5-d4 (0:02) cxd4 0 1 1338" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "c5d4" Turn started for GuestQQJN. Turn started for GuestBVCJ. void Game::Frontend::Miniature::confirmMove() move confirmed ... virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::AbstractEngine*) "d1d4" FICS: "fics% " FICS: "<12> r-b-kbnr pp--pppp ----q--- -------- ---Q---- --N----- PPP-BPPP R-B-K--R B -1 1 1 1 1 0 232 GuestQQJN GuestBVCJ -1 5 0 34 34 258 287 8 Q/d1-d4 (0:04) Qxd4 0 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "d1d4" Turn started for GuestBVCJ. FICS: "fics% " FICS: "<12> r-b-kb-r pp--pppp ----qn-- -------- ---Q---- --N----- PPP-BPPP R-B-K--R W -1 1 1 1 1 1 232 GuestQQJN GuestBVCJ 1 5 0 34 34 258 287 9 N/g8-f6 (0:01) Nf6 0 1 170" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "g8f6" Turn started for GuestQQJN. Turn started for GuestBVCJ. void Game::Frontend::Miniature::confirmMove() move confirmed ... virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::AbstractEngine*) "0-0" FICS: "fics% " FICS: "<12> r-b-kb-r pp--pppp ----qn-- -------- ---Q---- --N----- PPP-BPPP R-B--RK- B -1 0 0 1 1 2 232 GuestQQJN GuestBVCJ -1 5 0 34 34 248 287 9 o-o (0:09) O-O 0 1 0" void Game::Position::addPiece(const Game::Piece&) Refusing to add invalid piece to position. FICS: "fics% " FICS: "<12> r-b-kb-r pp--pp-p ----qnp- -------- ---Q---- --N----- PPP-BPPP R-B--RK- W -1 0 0 1 1 0 232 GuestQQJN GuestBVCJ 1 5 0 34 34 248 283 10 P/g7-g6 (0:03) g6 0 1 174" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "g7g6" Turn started for GuestQQJN. Turn started for GuestBVCJ. void Game::Frontend::Miniature::confirmMove() move confirmed ... virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::AbstractEngine*) "c1e3" FICS: "fics% " FICS: "<12> r-b-kb-r pp--pp-p ----qnp- -------- ---Q---- --N-B--- PPP-BPPP R----RK- B -1 0 0 1 1 1 232 GuestQQJN GuestBVCJ -1 5 0 34 34 232 283 10 B/c1-e3 (0:17) Be3 0 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "c1e3" Turn started for GuestBVCJ. FICS: "fics% " FICS: "<12> r-b-k--r pp--ppbp ----qnp- -------- ---Q---- --N-B--- PPP-BPPP R----RK- W -1 0 0 1 1 2 232 GuestQQJN GuestBVCJ 1 5 0 34 34 232 278 11 B/f8-g7 (0:05) Bg7 0 1 177" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "f8g7" Turn started for GuestQQJN. Turn started for GuestBVCJ. void Game::Frontend::Miniature::confirmMove() move confirmed ... virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::AbstractEngine*) "a1d1" FICS: "fics% " FICS: "<12> r-b-k--r pp--ppbp ----qnp- -------- ---Q---- --N-B--- PPP-BPPP ---R-RK- B -1 0 0 1 1 3 232 GuestQQJN GuestBVCJ -1 5 0 34 34 212 278 11 R/a1-d1 (0:20) Rad1 0 1 0" virtual void Game::Command::Move::exec(Game::Dispatcher*, Game::Frontend::Miniature*) "a1d1" Turn started for GuestBVCJ. FICS: "fics% " FICS: "<12> r-b--rk- pp--ppbp ----qnp- -------- ---Q---- --N-B--- PPP-BPPP ---R-RK- W -1 0 0 0 0 4 232 GuestQQJN GuestBVCJ 1 5 0 34 34 212 276 12 o-o (0:02) O-O 0 1 158" void Game::Position::addPiece(const Game::Piece&) Refusing to add invalid piece to position.
The dreaded o-o instead of the proper 0-0 … what can I say - need any more proof that the FICS protocol is neither normalized, nor "easy to parse"? Should be an easy fix though, as the 0-0 and 0-0-0 handling is all there already.
I'm half way on this easyfix. :) I changed "0-0" & "0-0-0" for "o-o" & "o-o-o" and this seems to allow the local castlings, but a) The log still registers complaints, even if the moves can be seen in Miniature and PC normally. b) The remote castlings still can't be digested at all by Miniature: not sen in screen, complaint in logs, cause game blocks. Here you can see an example: // Local castling, reflected in UI & game continues FICS: "fics% " FICS: "<12> r---kbnr pppqpppp --n----- ---p-b-- ---P-B-- --N----- PPPQPPPP --KR-BNR B -1 0 0 1 1 7 92 GuestXKCH testPLEASEIGNORE -1 57 58 39 39 3618 3583 5 o-o-o (0:18) O-O-O 0 1 0" void Game::Position::addPiece(const Game::Piece&) Refusing to add invalid piece to position. // Remote castling, not reflected in UI and game is blocked FICS: "fics% " FICS: "<12> --kr-bnr pppqpppp --n----- ---p-b-- ---P-B-- --N----- PPPQPPPP --KR-BNR W -1 0 0 0 0 8 92 GuestXKCH testPLEASEIGNORE 1 57 58 39 39 3618 3641 6 o-o-o (0:00) O-O-O 0 1 0" void Game::Position::addPiece(const Game::Piece&) Refusing to add invalid piece to position. I haven't found any place where this could be fixed, but if you guide me I'll try to fix it. For what is worth, I found strange that in position.h "CastlingFlags" appears in black while at line 99 while the rest of variables appear in the usual purple. Here: private: QVector<Piece> m_pieces; MovedPiece m_moved_piece; CastlingFlags m_castling_flags; Color m_next_to_move; File m_double_pawn_push;
(In reply to comment #10) > I'm half way on this easyfix. :) I changed "0-0" & "0-0-0" for "o-o" & "o-o-o" No not change, we need to handle both variants, sadly. > // Remote castling, not reflected in UI and game is blocked > FICS: "fics% " > FICS: "<12> --kr-bnr pppqpppp --n----- ---p-b-- ---P-B-- --N----- PPPQPPPP > --KR-BNR W -1 0 0 0 0 8 92 GuestXKCH testPLEASEIGNORE 1 57 58 39 39 3618 3641 6 > o-o-o (0:00) O-O-O 0 1 0" > void Game::Position::addPiece(const Game::Piece&) Refusing to add invalid piece > to position. OK, perhaps that's a different bug then - removing easyfix. > For what is worth, I found strange that in position.h "CastlingFlags" appears > in black while at line 99 while the rest of variables appear in the usual > purple. Here: Nah, that's just Qt Creator not recognizing Qt macros (here: QT_DECLARE_FLAGS).
Fixed with commit f9ee2f2a6a4d5c47cc97352f8e70760cf27f2a00. Please add attachments for longer game logs, as the bug reports become unreadable otherwise.
Verified and point taken. :)