File: cheat.py

package info (click to toggle)
gvrng 1.8.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 984 kB
  • ctags: 465
  • sloc: python: 2,573; makefile: 24; sh: 2
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