]> git.treefish.org Git - shutbox.git/blobdiff - src/game.py
updating qtable
[shutbox.git] / src / game.py
index 5e2fe70df5f0f58f733f7e72e1b46affbeda6392..5fc133a4280169935ae5b4e376e210f3d6610c07 100644 (file)
@@ -10,15 +10,19 @@ class Game:
     def dice(self):
         if not self._diced:
             self._diced = [random.randint(1, 6), random.randint(1, 6)]
     def dice(self):
         if not self._diced:
             self._diced = [random.randint(1, 6), random.randint(1, 6)]
+            self._diced.sort()
             for rods in [ self._diced,
                           [ abs(self._diced[0] - self._diced[1]) ],
                           [ self._diced[0] + self._diced[1] ] ]:
                 if self._can_be_shut(rods):
                     self._options.append(rods)
 
             for rods in [ self._diced,
                           [ abs(self._diced[0] - self._diced[1]) ],
                           [ self._diced[0] + self._diced[1] ] ]:
                 if self._can_be_shut(rods):
                     self._options.append(rods)
 
-    def get_dice(self):
+    def get_diced(self):
         return self._diced
 
         return self._diced
 
+    def get_shutable(self):
+        return self._shutable
+
     def get_options(self):
         return self._options
 
     def get_options(self):
         return self._options