Skip to content

Commit 6835e66

Browse files
committed
page (buttonSet.ts): use revealButtonVisibility
1 parent 74122b6 commit 6835e66

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/core/core.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export let core = (prop: LoadProp) => {
6161
oddWallList.concat(evenWallList).forEach(({ wall }) => {
6262
wall.visibility = 'invisible'
6363
})
64+
setRevealButtonVisibility(true)
6465
}
6566

6667
let makeWallVisible = (pos: Pair) => {
@@ -78,6 +79,7 @@ export let core = (prop: LoadProp) => {
7879

7980
revealLabyrinth$.subscribe(() => {
8081
oddWallList.forEach(makeWallVisible)
82+
setRevealButtonVisibility(false)
8183
render()
8284
})
8385

src/page/buttonSet.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,7 @@ export let ButtonSet = (prop: ButtonSetProp) => {
142142
{
143143
className: 'buttonSet',
144144
},
145-
[
146-
gameModeDropDown.elem,
147-
restartGameButton.elem,
148-
newGameButton.elem,
149-
revealLabyrinthButton.elem,
150-
],
145+
[gameModeDropDown.elem, newGameButton.elem, restartGameButton.elem],
151146
)
152147

153148
return {
@@ -162,6 +157,7 @@ export let ButtonSet = (prop: ButtonSetProp) => {
162157
} else {
163158
revealLabyrinthButton.elem.remove()
164159
}
160+
revealButtonVisibility = visibility
165161
},
166162
}
167163
}

0 commit comments

Comments
 (0)