X-Git-Url: https://git.cworth.org/git?p=lmno.games;a=blobdiff_plain;f=tictactoe%2Ftictactoe.jsx;h=326a5dd4740b0d465a94ab39296e5c5192feed79;hp=f5951f1ff26a4bb738dd26a13c74f13feed08ccf;hb=5eb93fbba3926dab3454295b14f521b6a9bc11d0;hpb=1809f95530cf644d89b33ac30c2c574ecd9365bd
diff --git a/tictactoe/tictactoe.jsx b/tictactoe/tictactoe.jsx
index f5951f1..326a5dd 100644
--- a/tictactoe/tictactoe.jsx
+++ b/tictactoe/tictactoe.jsx
@@ -253,28 +253,29 @@ class Game extends React.Component {
}
render() {
- const history = this.state.history;
- const current = history[this.state.step_number];
+ const state = this.state;
+ const history = state.history;
+ const current = history[state.step_number];
const winner = calculate_winner(current.squares);
let status;
if (winner) {
status = "Winner: " + winner;
} else {
- status = "Next player: " + (Team.properties[this.state.next_to_play].name);
+ status = "Next player: " + (Team.properties[state.next_to_play].name);
}
return [