summaryrefslogtreecommitdiff
path: root/Lib/turtledemo/nim.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/turtledemo/nim.py')
-rw-r--r--Lib/turtledemo/nim.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/turtledemo/nim.py b/Lib/turtledemo/nim.py
index 792ba51534..25ff3128f6 100644
--- a/Lib/turtledemo/nim.py
+++ b/Lib/turtledemo/nim.py
@@ -143,7 +143,6 @@ class NimView(object):
self.writer.write(msg1, align="center", font=("Courier",14,"bold"))
self.screen.tracer(True)
-
def setup(self):
self.screen.tracer(False)
for row in range(3):
@@ -181,6 +180,7 @@ class NimView(object):
if self.game.state == Nim.OVER:
self.screen.clear()
+
class NimController(object):
def __init__(self, game):
@@ -201,6 +201,7 @@ class NimController(object):
self.game.model.notify_move(row, col)
self.BUSY = False
+
class Nim(object):
CREATED = 0
RUNNING = 1
@@ -213,11 +214,10 @@ class Nim(object):
self.controller = NimController(self)
-mainscreen = turtle.Screen()
-mainscreen.mode("standard")
-mainscreen.setup(SCREENWIDTH, SCREENHEIGHT)
-
def main():
+ mainscreen = turtle.Screen()
+ mainscreen.mode("standard")
+ mainscreen.setup(SCREENWIDTH, SCREENHEIGHT)
nim = Nim(mainscreen)
return "EVENTLOOP!"