From a0594d1561fcc0e7c6cb1458ff848041d3f3a6d0 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 10 Oct 2017 12:51:33 -0700 Subject: [PATCH] Add some doc strings --- sudoku.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sudoku.py b/sudoku.py index a394b25..1575002 100644 --- a/sudoku.py +++ b/sudoku.py @@ -18,14 +18,23 @@ class Sudoku: @property def size(self): + ''' + The size of the board. This dictates the length of one side of the boxes that the board is subdivided into. + ''' return self._size @property def row_size(self): + ''' + The length of a row or column, or the area of a box in the grid. + ''' return self.size ** 2 @property def grid_size(self): + ''' + The total number of squares in the grid. + ''' return self.size ** 4 @property @@ -38,8 +47,8 @@ class Sudoku: @property def possible_values(self): ''' - The set of valid values for any grid square, not accounting for values made invalid by already being - present in a peer of that square. + The set of valid values for any grid square. This method does not account for values made invalid by already + being present in a peer of a given square. ''' return set(range(1, self.row_size + 1))