Like meta programming, creating a string to define a query and then executing the string. In the case above, you dynamically create the program you need to solve the problem and then execute it. This is different than "solving the problem". You are writing a program to "write the program to solve the problem".
Doesn't sound like this kind of complicated string eval would be able to do 1000Hz but then again I also have no clue where you could possibly need that for a snake game. On an oscilloscope you'd need to produce vector lines to move from/to right?
More likely, I would wager that they were just overwriting the instructions to draw with new instructions that just inline everything so it didn't need to fetch out to anything.