diff --git a/gauss-turing/webserver/gauss_turing.py b/gauss-turing/webserver/gauss_turing.py index d1d7fd2..e033a91 100644 --- a/gauss-turing/webserver/gauss_turing.py +++ b/gauss-turing/webserver/gauss_turing.py @@ -420,6 +420,9 @@ class Game: elif event.key == pygame.K_r: # run program self.state = 'running' + elif event.key == pygame.K_s: + self.state = 'manual' + self.prg.step() return self.state def reset(self): @@ -442,6 +445,8 @@ class Game: self.state = self.reset() elif self.state == 'quit': running = False + elif self.state == 'manual': + pass else: print("unknown state") return @@ -452,4 +457,8 @@ class Game: if __name__ == "__main__": random.seed(42) game = Game(dimx=7, dimy=4, robotx=3, roboty=1) - game.run() \ No newline at end of file + game.run() + +# TODOs +# - in stepping mode (s) it is possible to drive outside of the map +# - when no P0 command is present the program counter will overflow \ No newline at end of file