summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Anderson <jandew+dev@gmail.com>2016-02-16 22:23:43 -0800
committerJoe Anderson <jandew+dev@gmail.com>2016-02-16 22:23:43 -0800
commit27b695fe0169e3458c2218446cadcdf3189d46b0 (patch)
tree23e4b7c6ea37f74dd44016daa966563fcd1a3006
parent235f7742e40860fd0300ee7093e6a4cd03cb43da (diff)
downloadoo-27b695fe0169e3458c2218446cadcdf3189d46b0.tar.gz
oo-27b695fe0169e3458c2218446cadcdf3189d46b0.zip
more documentation tweaking
-rw-r--r--oo.py27
1 files changed, 14 insertions, 13 deletions
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.