BoardUtils.surround() works correctly
This commit is contained in:
parent
981ebe24c9
commit
318dc54826
4
utils.py
4
utils.py
|
@ -10,8 +10,8 @@ class BoardUtils:
|
|||
return occupied
|
||||
def surround(pos, radius=1):
|
||||
surrounding = []
|
||||
for i in range(-1 * radius, radius, 1):
|
||||
for j in range(-1 * radius, radius, 1):
|
||||
for i in range(-1 * radius, radius + 1, 1):
|
||||
for j in range(-1 * radius, radius + 1, 1):
|
||||
surrounding.append([pos[0] + i, pos[1] + j])
|
||||
|
||||
return surrounding
|
||||
|
|
Loading…
Reference in New Issue