Skip to content

Commit

Permalink
Fixed module problems
Browse files Browse the repository at this point in the history
  • Loading branch information
david-istvan committed Apr 2, 2024
1 parent 3a6e35a commit 5cfedf3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import os, sys; sys.path.append(os.path.dirname(os.path.realpath(__file__)))
2 changes: 1 addition & 1 deletion src/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def getCellAbove(self):
return Cell(max(self.y-1, 0), self.x)

def getCellBelow(self):
return Cell(min(self.y+1, self.n-1), ,self.x)
return Cell(min(self.y+1, self.n-1), self.x)

def getCellToTheRight(self):
return Cell(self.y, max(self.x-1, 0))
Expand Down
2 changes: 1 addition & 1 deletion src/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def parse(self, file):
[cell, opinion] = re.split(r' ', line)
coordinates = re.search(r'[0-9]{1},[0-9]{1}', cell)
[y, x] = re.split(r',', coordinates.group(0))
cell = Cell(int(y), int(x))
cell = Cell(int(y), int(x), int(n))
hints.append(Hint(cell, int(opinion), float(u)))

return Configuration(int(n), float(u), hints)

0 comments on commit 5cfedf3

Please sign in to comment.