From 27b695fe0169e3458c2218446cadcdf3189d46b0 Mon Sep 17 00:00:00 2001 From: Joe Anderson Date: Tue, 16 Feb 2016 22:23:43 -0800 Subject: more documentation tweaking --- oo.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'oo.py') diff --git a/oo.py b/oo.py index ced8d8f..9f48ed6 100644 --- a/oo.py +++ b/oo.py @@ -6,7 +6,20 @@ class ooPuzzle: No rendering information is stored or interpreted here. - All attributes are intended to be accessed through methods. + The following two attributes are to be accessed externally, + though editing them should be done through methods if possible: + + pieces is a dictionary mapping: + each position of form (x in range(self.X), + y in range(self.Y)) + to a piece id in range(6) + + orients is a dictionary mapping: + each position of form (x in range(self.X), + y in range(self.Y)) + to a direction index in range(4) + + All other attributes are intended to be accessed through methods. If direct access is necessary, here are their explanations: DIRECTIONS is a dictionary mapping: @@ -40,18 +53,6 @@ class ooPuzzle: toroidal is a bool indicating whether the border of the puzzle loops back to the opposite side NOT IMPLEMENTED! - - (the following are variable attributes during normal usage) - - pieces is a dictionary mapping: - each position of form (x in range(self.X), - y in range(self.Y)) - to a piece id in range(6) - - orients is a dictionary mapping: - each position of form (x in range(self.X), - y in range(self.Y)) - to a direction index in range(4) """ def __init__(self, X, Y, game_id=None, inverted=False, toroidal=False): """Create a new ooPuzzle instance. -- cgit v1.2.3-70-g09d2