View Full Version : Chess
vwphillips
05-12-2008, 11:52 AM
Could be of interest for anyone interested in Chess, but realy looking for anyone who can assist in testing and providing feedback.
http://www.vicsjavascripts.org.uk/Chess/Chess.htm
NancyJ
05-12-2008, 01:33 PM
I think I broke it. :(
I clicked on the black and it said 'white to move' so I clicked on the white and it said 'a piece cannot take the same colour'. Pressing new game didn't fix it
Stooshie
05-12-2008, 01:44 PM
Good idea.
It seems that when you click on a piece to move it, it initially acts like a drag and drop, but when you drag to the square you want it you have to click again to release it.
You should either have it as a drag and drop or have it as a 2click process. You have a kind of micture at the moment.
By the way, the autoplaying previous grand master matches is a nice touch.
vwphillips
05-12-2008, 02:28 PM
NancyJ
I clicked on the black and it said 'white to move' so I clicked on the white and it said 'a piece cannot take the same colour'. Pressing new game didn't fix it
I have tried this many times and it only occurs if the white piece tries to take another white piece.
Stooshie
it you have to click again to release it.
Whenever I play the mouseup releases the piece, the onclick event is only included just in case.
Thank you both for the feedback, keep playing.
binaryWeapon
05-12-2008, 03:15 PM
What exactly are the huge text-boxes below the game? BTW, the game looks great. I especially like the feature where you can see a famous game auto-played.
Stooshie
05-12-2008, 04:50 PM
Whenever I play the mouseup releases the piece, the onclick event is only included just in case.
It doesn't for me (Firefox 2.0.0.14).
vwphillips
05-12-2008, 05:02 PM
binaryWeapon
What exactly are the huge text-boxes below the game?
They are my debug tools.
Stooshie
It doesn't for me (Firefox 2.0.0.14).
So am I , so not sure what is wrong.
Thanks again for the feedback
Arbitrator
05-12-2008, 07:34 PM
I have tried this many times and it only occurs if the white piece tries to take another white piece.It also occurs when you click a piece of the current turn without attempting to move it in Firefox 2.0.0.14. I would expect no message or the piece to follow the mouse cursor in such a case.
You should be able to duplicate it by loading the page, holding the position of the mouse cursor still while it’s over a white piece, then left‐clicking once.
vwphillips
05-12-2008, 10:23 PM
Thank you Arbitrator and NancyJ
I see it now and have a fix on uploaded code.
Arbitrator
05-13-2008, 03:22 AM
Could be of interest for anyone interested in Chess, but realy looking for anyone who can assist in testing and providing feedback.
http://www.vicsjavascripts.org.uk/Chess/Chess.htmNow I notice that when I click a piece to select it, I can’t seem to de‐select it. Attempting to re‐click it, clicking other pieces, or other dragging pieces to force a de‐selection doesn’t seem to work. Additionally, I see no indicator that a piece has been selected outside of a temporary pop‐up message (I would expect some sort of focus on the selected piece like a border or color change or a static message to the side somewhere.)
Thank you Arbitrator and NancyJ
I see it now and have a fix on uploaded code.I can confirm that the noted issue was fixed.
vwphillips
05-13-2008, 06:58 AM
Arbitrator
click a piece to select it, I can’t seem to de‐select it.
I will have to think about this one.
It is normal in chess that once a piece has been touched it must be moved.
There is a popup warning indicating the selected piece if attempting to select a different piece and a cancel button to deselect the piece with the concent of the opposing player.
Thanks for the continued feedback.
Update:
I have incorperated a Selected Piece Indicator.
binaryWeapon
05-13-2008, 03:08 PM
Just a thought:
In some computer chess games, once you select a piece, the squares to which you can move it are distinguished from the rest of the board. I always found that very helpful, and to new players it is almost essential.
Just an idea for the future :thumbsup:
Example: (the e2 white pawn has been selected)
tagnu
05-13-2008, 03:20 PM
1. :cool: wow!!
2. :eek: Vic talks? (Just kidding)
How about integrating the drag and drop feature too.
Now when you try to drag, you get the 'unavailable' cursor first.
And to be able to drop, you need to
1. Release the mouse first (you get the 'move' cursor.)
2. Then, drop the players.
Stooshie
05-13-2008, 04:57 PM
vwphillips, I think the problem with the drag and drop in firefox is that firefox has an intrinsic behaviour attached to image items already which allows the user to drag and drop an image to, say, the desktop. I think this might be over-riding your drag and drop behaviour.
Not entirely sure how to fix it though, sorry.
vwphillips
05-13-2008, 05:06 PM
binaryWeapon
I'm not sure I want the script to teach how to play but maybe when I get bored.
tagnu and Stooshie
Thats two reports of drag and drop problems, works well for for me using IE and FF. Difficult for me to resolve if I can't see the problem.
Anyway thanks for the feedback.
binaryWeapon
05-14-2008, 12:12 AM
Difficult for me to resolve if I can't see the problem.
Brilliant! An excuse for me to try out my new software!
Here's a screen capture video of the problem:
http://img210.imageshack.us/my.php?image=chessdragdropproblemxn9.swf&width=800
Sorry about the quality, I had to use imageshack.
tagnu
05-14-2008, 06:01 AM
You are one step ahead. I was thinking of uploading the screencast.
Good work.
Software = wink?
vwphillips
05-14-2008, 10:19 AM
Thanks binaryWeapon
I've got it now
fside
05-14-2008, 02:24 PM
VW, since this is a finished script, posted to the post-a-javascript section, should you have a file download available that is stored on this site? One would assume the program is too large for a message.
binaryWeapon
05-14-2008, 02:58 PM
Software = wink?
Yup. It's free and seems to work great. I've tried it both for my Vista and XP.
BTW the site is http://www.debugmode.com/wink/
RexxCrow
05-15-2008, 03:41 AM
From my understanding you can change your mind once only if you keep you hand on the piece, once you remove your hand that where that piece remains, however, while your hand is on the piece you can debate which piece you want to actually move and where you actually want to move said piece.
Really neat idea, BTW.
Arbitrator
05-15-2008, 06:23 AM
Could be of interest for anyone interested in Chess, but realy looking for anyone who can assist in testing and providing feedback.
http://www.vicsjavascripts.org.uk/Chess/Chess.htmI discovered another issue; when I put black’s king in check, it says mate instead of check for some reason.
! Mate !
Move 2 - White Bishop F1 to B5 MATE
Move 1 - Black Pawn D7 to D5
Move 1 - White Pawn E2 to E4
Arbitrator
I will have to think about this one.
It is normal in chess that once a piece has been touched it must be moved.In my experience, the touch‐move rule is only used during tournaments or when practicing for one. I’ve never been subjected to such a rule during casual play or when playing on the computer via Yahoo! Chess, MSN Gaming Zone Chess, or Chessmaster 4000. I guess the desired behavior depends upon what you’re aiming for with this program.
From my understanding you can change your mind once only if you keep you hand on the piece, once you remove your hand that where that piece remains, however, while your hand is on the piece you can debate which piece you want to actually move and where you actually want to move said piece.During the USCF tournaments in which I played, once you touched a piece, that was the piece you had to move. It was strict to the point that if you wanted to touch a piece to adjust it (i.e., without moving it to another square), you had to give a warning that you were going to do so first. I’m not sure what was suppose to happen if there were no valid moves available for the touched piece though.
chump2877
05-17-2008, 05:30 AM
Hi VW, very nice work....I'm sure that took some time to create...
I was unable to capture an opponent's piece in either Opera 9 or IE 7....I don't feel like firing it up in FF right now to check in there as well...;)...Maybe I was doing something wrong?
Are you planning to create a human vs. computer version? That would be a challenge!
vwphillips
05-20-2008, 05:19 PM
Sorry I have been away for a while.
I have now made it a two action move and hilighted the piece square as previously suggested and a few other tweeks.
The latest version has been uploaded.
and thanks for your time.
vBulletin® v3.8.2, Copyright ©2000-2010, Jelsoft Enterprises Ltd.