]> git.cworth.org Git - lmno.games/commit
Fix square to not be active if occupied
authorCarl Worth <cworth@cworth.org>
Sun, 21 Jun 2020 16:19:53 +0000 (09:19 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 21 Jun 2020 16:19:53 +0000 (09:19 -0700)
commitece82f79122ffd6f1e3c8fb0d0dac7daae824b92
tree082c76784cac9a7864f768faa6c159dcc42e532e
parentf44e7e5f69e19ceb1909f371eb88e44e736990ee
Fix square to not be active if occupied

Thanks to Scott who noticed yesterday he could tap on an occupied
square and get an error message including "Square is already
occupied". It's good the server catches that case and sends an
error. And it's good the client presentes that cleanly.

But the client shouldn't ever even let the user submit a move that the
client already know is not legal.

In this commit we appropriately set a square to not be active if it is
already occupied. This fixes the case described above, and further
makes it so that hovering over an occupied square won't even present
the user with a cursor suggesting the square is "clickable".
scribe/scribe.jsx