Skip to contents

Exits ram.run() without printing an error traceback; the code equivalent of ^C. This function is intended to be run in custom Game Code.

Usage

ram.end()

Details

Useful for Game Over scenarios, etc; see its usage in vignette("snake").

Examples

print(Snake$end_game)
#> function(RAM){
#> 	cat('Game over! Size: ',
#> 			RAM$segments,
#> 			'. Time survived: ',
#> 			RAM$ticks_survived,
#> 			'.',
#> 			sep='')
#> 
#> 	RAM$ROM$view_data(RAM)
#> 
#> 	ram.end() #stops the game
#> }