ryanb / govsgo

Rails 3 app for playing the board game Go online.
http://govsgo.com
MIT License
140 stars 23 forks source link

Place Stone Quickly #24

Open ryanb opened 14 years ago

ryanb commented 14 years ago

The stone does not show up immediately when placing a move. This is because it must contact the server to determine if it's a legal move and how it should effect the surrounding stones.

Ideally there should be some logic in the JavaScript to handle capturing of stones so it can be displayed immediately.

If this proves too difficult we could just display the stone and then update the capturing later. Maybe add a little spinning wheel to the stone to show that it isn't done.

alexslade commented 13 years ago

Move legality is fairly easy to work out isn't it? You could add a simple javascript check method:

Check the stone will have enough liberties (90% of the time this is a simple check, it's only with capturing that it becomes a little more difficult, and in that case, a delay could be acceptable)

Check the move is not a repetition (Ko rule).

ryanb commented 13 years ago

It also needs to handle the capture logic which is the more complex part. I think it would look weird if the capture feedback was delayed.

alexslade commented 13 years ago

I don't imagine it would. It happens fairly rarely, and you'd expect a capture check to take a little longer. It's only a tiny delay.