From 4bbe7542150bf0d3e1ddd83255928a4568da502c Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Fri, 14 Apr 2017 15:47:19 -0700 Subject: [PATCH] Cleanup square.py example - Remove unused imports - Change tabs to 4 space indents and use more traditional Python style - Make sure it `flake8 square.py` reports no warnings - and example still runs of course --- .../miniSim/10.Square/square/square.py | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/source/Bin/Minibloq/work/_examples/miniSim/10.Square/square/square.py b/source/Bin/Minibloq/work/_examples/miniSim/10.Square/square/square.py index b15bf499..3eac0fde 100755 --- a/source/Bin/Minibloq/work/_examples/miniSim/10.Square/square/square.py +++ b/source/Bin/Minibloq/work/_examples/miniSim/10.Square/square/square.py @@ -1,16 +1,18 @@ -import math -import pygame from miniSim import MiniSim -from miniSim import MobileRobot + miniSim = MiniSim() robot = miniSim.robot0 + def go(): - miniSim.resetRobot(robot) - robot.penWidth = 30 - robot.penDown() - for _i in range(4): - robot.move(200) - robot.rotate(90) + miniSim.resetRobot(robot) + robot.penWidth = 30 + robot.penDown() + + for _i in range(4): + robot.move(200) + robot.rotate(90) + + miniSim.go = go -miniSim.run() +miniSim.run()