summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Ward <peteraward@gmail.com>2009-10-28 18:08:07 +1100
committerPeter Ward <peteraward@gmail.com>2009-10-28 18:08:07 +1100
commit98412e53d4de308efbf91648f54d3150091f0213 (patch)
treeec8d400ac3678d842b32d7f2d32239ab86ff1d98
parent68b9a117e03c6f64d1f15280a0ec61824d25ced6 (diff)
Fixed long-running bug.
-rw-r--r--snake.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/snake.py b/snake.py
index ba25814..40d38d7 100644
--- a/snake.py
+++ b/snake.py
@@ -17,9 +17,6 @@ class SnakeEngine(object):
def __init__(self, rows, columns, n_apples, results=False):
super(SnakeEngine, self).__init__()
- self.letters = list(string.lowercase)
- self.letters.reverse()
-
self.bots = {}
self.results = None
if results:
@@ -43,6 +40,9 @@ class SnakeEngine(object):
self.start_time = time.time()
self.game_id = random.randint(0, sys.maxint)
+ self.letters = list(string.lowercase)
+ self.letters.reverse()
+
self.rows = rows
self.columns = columns