Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Commit

Permalink
Fix this (not sure why it is like this)
Browse files Browse the repository at this point in the history
  • Loading branch information
rowleya committed Mar 7, 2024
1 parent d441ecc commit 24b246f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sudoku/sudoku.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def activate_visualiser(old_vis):
#
# set up the inter-cell inhibitory connections
#
def interCell():
def interCell(x, y, r, c, connections):
""" Inhibit same number: connections are n_N squares on diagonal of
weight_cell() from cell[x][y] to cell[r][c]
"""
Expand All @@ -225,14 +225,14 @@ def interCell():
for y in range(9):
for r in range(9):
if r != x:
interCell() # by row...
interCell(x, y, r, y, connections) # by row...
for c in range(9):
if c != y:
interCell() # by column...
interCell(x, y, x, c, connections) # by column...
for r in range(3 * (x // 3), 3 * (x // 3 + 1)):
for c in range(3 * (y // 3), 3 * (y // 3 + 1)):
if r != x and c != y:
interCell() # & by square
interCell(x, y, r, c, connections) # & by square
conn_intC = p.FromListConnector(connections)
p.Projection(cells, cells, conn_intC, receptor_type="inhibitory")

Expand Down

0 comments on commit 24b246f

Please sign in to comment.