Skip to content

Commit 430dd3b

Browse files
committed
Update readme
1 parent 2162e91 commit 430dd3b

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ const Minefield = {
2424
// Game instance structure Minefield.getInstance()
2525
const instance = {
2626
addListener: (event, fn) => {},
27-
start: () => {},
28-
open: (x, y) => {},
29-
flag: (x, y) => {},
30-
getState: () => {},
31-
reset: () => {}
27+
start: () => game.start(),
28+
open: (x, y) => game.open(x, y),
29+
flag: (x, y) => game.flag(x, y),
30+
batch: (payload) => game.batch(payload),
31+
getState: () => game.getState(),
32+
reset: () => game.start()
3233
}
3334
```
3435

@@ -57,6 +58,12 @@ minefield.flag(row, cow) // toggle action
5758

5859
// Open a checker
5960
minefield.open(row, cow)
61+
62+
// Open or make flag to many checker
63+
minefield.batck([
64+
{ row, cow },
65+
{ row, cow, flag: true }
66+
])
6067
```
6168

6269
**Options**

0 commit comments

Comments
 (0)