Quick fix

This commit is contained in:
aronmal 2023-01-12 11:50:04 +01:00
parent a282e35119
commit b2fd8f56fc
Signed by: aronmal
GPG key ID: 816B7707426FC612

View file

@ -88,9 +88,10 @@ function useGameEvent(count: number) {
].reduce((prev, curr) => prev || curr, false) ].reduce((prev, curr) => prev || curr, false)
return !border return !border
}).map(field => { }).map(field => {
const { x, y } = field.target const { target, params } = field
const { x, y } = target
if (isHit(hits, x, y).length) if (isHit(hits, x, y).length)
return Object.assign(field, { imply: true }) return Object.assign(field, Object.assign(params, { imply: true }))
return field return field
}) })
setTargetList(e => { setTargetList(e => {
@ -111,9 +112,10 @@ function useGameEvent(count: number) {
].reduce((prev, curr) => prev || curr, false) ].reduce((prev, curr) => prev || curr, false)
return !border return !border
}).map(field => { }).map(field => {
const { x, y } = field.target const { target, params } = field
const { x, y } = target
if (isHit(hits, x, y).length || isSet(x, y)) if (isHit(hits, x, y).length || isSet(x, y))
return Object.assign(field, { imply: true }) return Object.assign(field, Object.assign(params, { imply: true }))
return field return field
}) })
if (!targetPreviewPos.shouldShow) if (!targetPreviewPos.shouldShow)