soft internalized some methods
Have learned how to "internalize" methods 😆
This commit is contained in:
parent
446ffba554
commit
00daf53fae
@ -31,11 +31,11 @@ class GameLogic():
|
||||
directions = ((0, 1), (1, 0), (1,1), (-1, 1))
|
||||
for mark in markList:
|
||||
for direction in directions:
|
||||
if self.is_line(markList, mark, direction):
|
||||
if self._is_line(markList, mark, direction):
|
||||
return player
|
||||
return False
|
||||
|
||||
def is_line(self, markList, mark, direction): # INTERNAL, I guess.
|
||||
def _is_line(self, markList, mark, direction):
|
||||
for i in range(1, self.winRowLength):
|
||||
seeked = (mark[0] + direction[0] * i, mark[1] + direction[1] * i)
|
||||
if seeked in markList:
|
||||
|
Loading…
Reference in New Issue
Block a user