glinscott / Garbochess-JS

A strong javascript chess engine using WebWorkers
http://forwardcoding.com/projects/ajaxchess/chess.html
Other
313 stars 101 forks source link

UI fix for drops outside of case logic #11

Closed barneycarroll closed 11 years ago

barneycarroll commented 11 years ago

If you drag a piece onto an illegal square or off the table, no other pieces can be moved unless the badly dropped piece is legally dropped.

This adds an extra fallback clause if no legal move conditions are met on drop with the same result as 'same square'.

glinscott commented 11 years ago

Thanks for the bug report, and the pull request! The commit seems to be empty though?

barneycarroll commented 11 years ago

Oops, sorry. The pertinent change is here: 9c8e7af67086f906a1af5ab214d5f7b13c9adba4

glinscott commented 11 years ago

Ah, great, thanks. Maybe merge the move == null check with the "if (startX == endX && startY == endY)" check just a little earlier?

glinscott commented 11 years ago

Thanks! Merged.