From 24601be13c4797482be623a5f162d9e424e1c180 Mon Sep 17 00:00:00 2001 From: Paulina Nowak Date: Thu, 24 Dec 2020 00:39:08 +0100 Subject: [PATCH] ffss --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 2f99aed..f9bca0e 100644 --- a/main.py +++ b/main.py @@ -16,12 +16,12 @@ class TicTacToe: def run(self): while True: - self.board.make_move(self.player1.token, self.player1.make_random_move(self.board.emptyFields)) + self.board.make_move(self.player1.token, self.player1.choose_random_field(self.board.emptyFields)) self.board.print() if self.board.isWin(self.player1.token, self.player1.name): break - self.board.make_move(self.player2.token, self.player2.make_random_move(self.board.emptyFields)) + self.board.make_move(self.player2.token, self.player2.choose_random_field(self.board.emptyFields)) self.board.print() if self.board.isWin(self.player2.token, self.player2.name): break @@ -66,7 +66,7 @@ class Player: self.token = token self.name = name - def make_random_move(self, emptyFields): + def choose_random_field(self, emptyFields): return random.choice(emptyFields)