Page 1 of 1

Small nuance in moving. Xboard

PostPosted: 29 Jul 2009, 16:13
by rigao
Normally, when I want to move a piece and I have another 1 selected (in the click and click method, not drag and drop), one click on the piece I want to move just selects my new piece to be moved. When it is the king which is selected, it takes 2 clicks on any other piece to actually select it.

I know this is not a big bug, maybe it is a feature! But it is quite annoying when I'm playing blitz to remember which piece I have selected in order to move (premove!) fast in the endgame.

Re: Small nuance in moving. Xboard

PostPosted: 29 Jul 2009, 16:45
by H.G.Muller
This is probably a side effect of Chess960 castlings, which are enterd as K captures own R. Does it say "illegal move" in the message field when you do that? Although this should only happen if the second piece you click is a Rook. But this might only be in WinBoard, not in XBoard. For selecting a Rook after a King this will be hard to avoid, though. The front end will think you try to enter a castling move.

Re: Small nuance in moving. Xboard

PostPosted: 29 Jul 2009, 16:56
by rigao
Sorry, but I don't know how to look at the message field. When I run it in the console, nothing pops out anywhere when I select first the king and then another piece.

Anyways, if this is the reason (incidentally now I know how to castle in fisher random, until now, I just used 0-0 and 0-0-0 in the FICS input box :)) it will be great if it happened only after king - rook selection, and just in that case. It will be even greater if xboard tries to castle first, and if it could not do it, then just select the piece, all in 1 click :)

Re: Small nuance in moving. Xboard

PostPosted: 29 Jul 2009, 19:01
by H.G.Muller
The message field is the text field above the board and below the clocks, where moves and other message are printed.

From looking at the code I see that the move entering code is not yet as well adapted to the new functions in the back-end for testing move-legality as WinBoard is. Changing anything in this area is a bit risky, as I never studied the move-entering code of XBoard in detail. When adapting WinBoard I added a routine in the back-end to do the preliminary test in more detail, limiting the double-click selection of a piece after King to FRC and CRC, and even then only if the piece is a Rook. But the XBoard front-end does not call this routine yet.

This part of XBoard should still be completely redone, as it also still exhibits the weird appearance of the promotion popup on an obviously illegal move (e.g. if you start with 1. e2xd8). But if the current behavior is annoying, I'd better do a make-shift patch on it that duplicates what is already done in the back-end. At the very least I should limit it to R after K.