File: cheat.py

package info (click to toggle)
gvrng 3.1-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,836 kB
  • ctags: 581
  • sloc: python: 3,029; sh: 26; makefile: 24
file content (10 lines) | stat: -rw-r--r-- 358 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
class Cheat:
    def __call__(self, command, robot):
        if command == 'makebeeper':
            robot.world.robotBeepers += 1
        elif command == 'breakpoint':
            robot.gui.breakpoint()
        elif command in robot.gui.SleepDict.keys():
            robot.gui.setSpeed(command)
        else:
            print 'unrecognized cheat', command