Skip to content

120 페이지 게임 개발 질문 #210

Description

@Lee-jh01

안녕하세요.
게임 개발 답안에서 이해 안 가는 부분이 있어 질문 올립니다.

답안 중 아래 조건문에서

if d[nx][ny] == 0 and array[nx][ny] == 0 : 

nx와 ny는 음수가 나올 수 있는데, 찾아보니 파이썬에서 index가 음수일 경우 배열의 끝으로 돌아가서 조회 결과를 낸다고 합니다.
그렇게 될 경우, 영역을 벗어나는 경우는 체크하지 않게 되는 것이고, 정확하지 않은 위치의 값을 조회하게 되는 것 아닌가요...?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions