Skip to content

Commit

Permalink
Merge pull request #12 from gamultong/hotfix/reuse-sections
Browse files Browse the repository at this point in the history
섹션 재사용
  • Loading branch information
onee-only authored Nov 26, 2024
2 parents 81d8058 + d6d3ba3 commit 1c749a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion board/internal/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def fetch(start: Point, end: Point):
fetched = None
for sec_y in range(start.y // Section.LENGTH, end.y // Section.LENGTH - 1, - 1):
for sec_x in range(start.x // Section.LENGTH, end.x // Section.LENGTH + 1):
section = Board.sections[sec_y][sec_x]
# TODO: 임시로 기존 맵 돌려쓰도록 만듦. **나중에 삭제**
section = Board.sections[sec_y % -len(Board.sections)][sec_x % -len(Board.sections)]

start_p = Point(
x=max(start.x, section.abs_x) - (section.abs_x),
Expand Down

0 comments on commit 1c749a1

Please sign in to comment.