I have developed a game that basically moves on a Cartesian coordinate system. Now to spare you all having to read through all the code I wrote( simply because I am still new and its very bad haha)I will simply ask the question. I read somewhere that you can fake user input by modifying the StringIO and tried a few things but I dont really understand how you manipulate it.I have added a command that captures all the movement commands and i want to replay all the movements that have been passed to the user input. So what i want to do is to be able to make a replay function that simply passes the recorded moves in as input to repeat those movements instead of having to type them in again.
Asked
Active
Viewed 50 times
0
-
How do you capture the use input? – Klaus D. Nov 24 '21 at 13:27
-
I have a function user_commands that takes the users input and returns it – Cecil Shepherd Nov 24 '21 at 13:37
-
**How** does it take the input? `input()`? – Klaus D. Nov 24 '21 at 13:39
-
oh sorry. yes just your standard input user_command = input("some text: ") – Cecil Shepherd Nov 24 '21 at 13:57