Skip to content

Commit

Permalink
Merge pull request #103 from izumiya-keisuke/bug
Browse files Browse the repository at this point in the history
[bug] immediate next pair
  • Loading branch information
24ik authored Mar 14, 2024
2 parents 2a4e9e8 + e5dec55 commit 5acf37b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pon2.nimble
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package

version = "0.13.1"
version = "0.13.2"
author = "Keisuke Izumiya"
description = "Puyo Puyo and Nazo Puyo Application"
license = "Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions src/pon2pkg/private/app/simulator/common.nim
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func nextPairCell*(
func immediateNextPairCell*(simulator: Simulator, axis: bool): Cell {.inline.} =
## Returns the next-pair's cell in the immediate pairs.
simulator.nazoPuyoWrap.get:
let nextIdx = wrappedNazoPuyo.puyoPuyo.nextIndex
let nextIdx = wrappedNazoPuyo.puyoPuyo.nextIndex.succ
if nextIdx >= wrappedNazoPuyo.puyoPuyo.pairsPositions.len:
return Cell.None

Expand All @@ -129,7 +129,7 @@ func immediateNextPairCell*(simulator: Simulator, axis: bool): Cell {.inline.} =
func immediateDoubleNextPairCell*(simulator: Simulator, axis: bool): Cell {.inline.} =
## Returns the double-next-pair's cell in the immediate pairs.
simulator.nazoPuyoWrap.get:
let doubleNextIdx = wrappedNazoPuyo.puyoPuyo.nextIndex.succ
let doubleNextIdx = wrappedNazoPuyo.puyoPuyo.nextIndex.succ 2
if doubleNextIdx >= wrappedNazoPuyo.puyoPuyo.pairsPositions.len:
return Cell.None

Expand Down

0 comments on commit 5acf37b

Please sign in to comment.