Skip to content
This repository was archived by the owner on Sep 15, 2020. It is now read-only.

Commit b22242c

Browse files
committed
fix(game): prevent figures to be placed on obstructed fields
1 parent 0796f82 commit b22242c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

socha

Submodule socha updated from 8866759 to c3c2834

src/viewer/Viewer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ export class Viewer {
215215
firstAction.color,
216216
firstAction.index,
217217
state.board.fields.map(
218-
col => col.map(field => field.coordinates),
218+
col => col.filter(field => !field.obstructed).map(field => field.coordinates),
219219
).reduce((a, c) => a.concat(c)),
220220
)
221221
}

0 commit comments

Comments
 (0)