projects
/
lmno.games
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e79802f
)
Fix bug where second players first move was forced to match first player's
author
Carl Worth
<cworth@cworth.org>
Sat, 20 Jun 2020 20:14:29 +0000
(13:14 -0700)
committer
Carl Worth
<cworth@cworth.org>
Sat, 20 Jun 2020 20:14:29 +0000
(13:14 -0700)
When the last_two_moves array has only one entry in it, then index 0
is the last move, not two moves ago, so we don't actually want to look
at that.
scribe/scribe.jsx
patch
|
blob
|
history
diff --git
a/scribe/scribe.jsx
b/scribe/scribe.jsx
index 07920773c9f79caa371b178639deaa35fea5a040..2cc51483c3a429f5a2f0d0e91d7ddf0deda8109c 100644
(file)
--- a/
scribe/scribe.jsx
+++ b/
scribe/scribe.jsx
@@
-405,7
+405,7
@@
class Board extends React.Component {
let active = false;
if (this.props.active) {
active = true;
- if (this.props.last_two_moves
[0]
) {
+ if (this.props.last_two_moves
.length > 1
) {
/* First index (0) gives us our last move, (that is, of the
* last two moves, it's the first one, so two moves ago).
*