Closed hikito-otikih closed 2 weeks ago
Then it probably was not a legal promotion move, can you show the code please ?
ERROR UDSm53 - Online Java Compiler & Debugging Tool - Ideone.comhttps://ideone.com/UDSm53 You can see that, in this code, i use type 0 for MOVE and type 1 for UNMOVE. [https://res.public.onecdn.static.microsoft/assets/mail/file-icon/png/docx_16x16.png]listmove.docxhttps://studenthcmusedu-my.sharepoint.com/:w:/g/personal/24125020_student_hcmus_edu_vn/ETwHZBBz4LZCshDjiK29oGEBeVm5jV2cUubADvdAlCUKqQ See listmove, it's a context.
From: disservin @.> Sent: Monday, October 21, 2024 9:19 PM To: Disservin/chess-library @.> Cc: HUỲNH CHÍ TÔN @.>; Author @.> Subject: Re: [Disservin/chess-library] UNMAKEMOVE a PROMOTIONMOVE is WRONGGGG (Issue #136)
Then it probably was not a legal promotion move, can you show the code please ?
— Reply to this email directly, view it on GitHubhttps://github.com/Disservin/chess-library/issues/136#issuecomment-2426824932, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BMD2LCZVIVVY3PU4XDYOQZLZ4UEPTAVCNFSM6AAAAABQKIPEZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRWHAZDIOJTGI. You are receiving this because you authored the thread.Message ID: @.***>
Ah and an other wrong is after draw, board is keeping generating the valid move.
From: disservin @.> Sent: Monday, October 21, 2024 9:19 PM To: Disservin/chess-library @.> Cc: HUỲNH CHÍ TÔN @.>; Author @.> Subject: Re: [Disservin/chess-library] UNMAKEMOVE a PROMOTIONMOVE is WRONGGGG (Issue #136)
Then it probably was not a legal promotion move, can you show the code please ?
— Reply to this email directly, view it on GitHubhttps://github.com/Disservin/chess-library/issues/136#issuecomment-2426824932, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BMD2LCZVIVVY3PU4XDYOQZLZ4UEPTAVCNFSM6AAAAABQKIPEZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRWHAZDIOJTGI. You are receiving this because you authored the thread.Message ID: @.***>
The problem is that uciToMove
requires the move to be a valid move for the current board. Your uciToMove in unmakeMove tries to parse the move like it was a valid move which could be played on the board, which isnt the case because it was already played. So if you want to undo previous moves you have to store the moves in a stack and then take the last move from the stack and undo that.
i tried to unmakemove a promotionmove and the board chess is added a rook : )?