We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c9ffe20 + f39b1ee commit b638d0aCopy full SHA for b638d0a
src/games/enso.ts
@@ -162,7 +162,7 @@ export class EnsoGame extends GameBase {
162
for (const dir of allDirections) {
163
let ray = g.ray(fx, fy, dir).map(c => g.coords2algebraic(...c));
164
const idx = ray.findIndex(cell => this.board.has(cell));
165
- if (idx > 0) {
+ if (idx >= 0) {
166
// this ray only contains contiguous empty spaces leading up
167
// to the first occupied space
168
ray = ray.slice(0, idx);
0 commit comments