Browse Source

renamed a method variable

main
sp 1 month ago
parent
commit
8193ddeea8
  1. 6
      trees_and_tents.py

6
trees_and_tents.py

@ -69,12 +69,12 @@ def get_possible_tents_in_row(row):
return possible_tent_positions
def get_neighbours(i, j):
cs = []
cells = []
for p in range(max(i-1, 0), min(i+2, size_y)):
for q in range(max(j-1, 0), min(j+2, size_x)):
if p == i and q == j: continue
cs.append(cells[p][q])
return cs
cells.append(cells[p][q])
return cells
def get_tree_neighbours(i, j):
tree_pos = []

Loading…
Cancel
Save