From f10c39531fd5e0ee5636e381c4858af9eca8cb51 Mon Sep 17 00:00:00 2001 From: Chris Proctor Date: Thu, 28 Apr 2022 19:12:52 -0400 Subject: [PATCH] Add docstring --- ttt_game.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ttt_game.py b/ttt_game.py index 462cccb..ca6993d 100644 --- a/ttt_game.py +++ b/ttt_game.py @@ -10,6 +10,7 @@ class TTTGame: } def play_move(self, move): + "Updates the game's state by recording a move" if not self.is_valid_move(move): raise ValueError(f"Illegal move {move} with board {self.board}.") self.board[move] = self.get_current_player_symbol() @@ -20,7 +21,7 @@ class TTTGame: return [index for index in range(9) if self.board[index] is None] def is_valid_move(self, move): - "Checks whether a move is valid." + "Checks whether a move is valid" return move in self.get_valid_moves() def get_current_player_symbol(self):