- const L = this.moves.length;
- if (_.isEqual(this.moves[L-1], this.moves[L-5]) &&
- _.isEqual(this.moves[L-2], this.moves[L-6]) &&
- _.isEqual(this.moves[L-3], this.moves[L-7]) &&
- _.isEqual(this.moves[L-4], this.moves[L-8]))
- {
- return true;
- }
+ const move = this.moves[i];
+ if (!this.hashStates[move.hash])
+ this.hashStates[move.hash] = 1;
+ else
+ this.hashStates[move.hash]++;