diff options
author | Joe Anderson <jandew+dev@gmail.com> | 2016-02-16 22:23:43 -0800 |
---|---|---|
committer | Joe Anderson <jandew+dev@gmail.com> | 2016-02-16 22:23:43 -0800 |
commit | 27b695fe0169e3458c2218446cadcdf3189d46b0 (patch) | |
tree | 23e4b7c6ea37f74dd44016daa966563fcd1a3006 /oo.py | |
parent | 235f7742e40860fd0300ee7093e6a4cd03cb43da (diff) | |
download | oo-27b695fe0169e3458c2218446cadcdf3189d46b0.tar.gz oo-27b695fe0169e3458c2218446cadcdf3189d46b0.zip |
more documentation tweaking
Diffstat (limited to 'oo.py')
-rw-r--r-- | oo.py | 27 |
1 files changed, 14 insertions, 13 deletions
@@ -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. |