In the game, the console is cleared with cat("\014") between frames. This only clears the screen in RStudio, though. In the terminal it would need to be system("clear").
To detect whether R is running via RStudio or not, one can check Sys.getenv("RSTUDIO") which is set to 1 when running in RStudio.
We can detect this on startup, set a field value and then have if statements to choose between cat("\014") and system("clear") whenever the console needs to clear.
For example a nut ๐ฐ that spawns randomly and stays in situ until the player reaches that space. Could be used for a scoring system. Could have a running tally like the moves tally that's printed with the output.
Yeah, it's pretty stupid. Move towards player? Second antagonist? Maybe a fox moves in the current owl pattern, while the owl swoops like a rook or bishop.