xboard-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XBoard-devel] Premove again


From: h.g. muller
Subject: Re: [XBoard-devel] Premove again
Date: Wed, 07 Oct 2009 08:59:43 +0200


Is there an easy way to change this? Since I would guess that those
moves are often moves that you would like to premove in fast games.

Can we do something like this: for premoves just test if the piece can
in principle move there, independent of what's on the toSquare, that is
add a function  Then when we do the actual move, check for premoves, if
the move is valid, if yes do it, if no wait for new input...

This is quite a big change, as it would require an entirely new move generator;
te current move generator only tests if moves are valid in the context of a given
position (i.e. Rb1-b8 would not be valid if there is an enemy Pawn on b7, or if
there is an enemy Ra1 pinning Rb1 on Kg1). What your scheme requires is
a test of a piece of that type might be able to make the move after a yet unknown
opponent move.

I think it is better to stick to the exiting system anyway: if someone grabs a
piece with the intension to enter a premove, say Qd1, and then thinks the better of it and puts it down on d1 again, and now gabs Bc1... I think it would be very confusing (and annoying) if he now does not hold the Bishop in the mouse cursor
but in stead finds  premove Qd1-c1 entered. While grabbing, Ng8 or almost any
other piece after putting Qd1 down would have worked. So clicking a new own
piece after 'touching' an own piece should alway get hold of that new piece,
even if the old piece might have been able to capture it after some opponent move.

What I will probably do is give UserMoveEvent an extra parameter, which tells it
if it is called from the button-down or button-up part of the mouse handler,
and let it skip the capture-own test in the latter case. This will require a change
in the XBoard front-end, to pass the new argument. So perhaps I will take the
opportunity to rewrite the XBoard mouse handler to suppress the promotion popup
for obviously illegal promotion moves (e.g. 1. e2-a8), like I already did for WinBoard.



but this could happen all the time and I think is a risk you have to
live with when doing a premove... e.g. you could just premove a piece
(say advance a pawn) and the opponent makes a move you didn't anticipate
(say he takes your queen or just threatens to take your queen in the
next move) and then you do the premove, so instead of recapturing or
protecting your queen you just moved a pawn... using premove does have
risks and I think it's up to the user to decide if he wants to do it or
not...

cheers
     ARUN






reply via email to

[Prev in Thread] Current Thread [Next in Thread]