From 00daf53fae2118e6b9cb830f78ee5b153b2fc348 Mon Sep 17 00:00:00 2001 From: oto Date: Mon, 15 Aug 2022 07:29:25 +0300 Subject: [PATCH] soft internalized some methods Have learned how to "internalize" methods :laughing: --- GameLogic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GameLogic.py b/GameLogic.py index fcd36cd..46bfdaf 100644 --- a/GameLogic.py +++ b/GameLogic.py @@ -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: