Robots: Difference between revisions

Content added Content deleted
m (J: another bit of documentation)
Line 22: Line 22:


This approximately emulates the bsd robots game. There's a few differences (the game board is larger and has an explicitly displayed junk border, to quit early you close the window, ...), but the fundamental mechanics and display should be pretty close.
This approximately emulates the bsd robots game. There's a few differences (the game board is larger and has an explicitly displayed junk border, to quit early you close the window, ...), but the fundamental mechanics and display should be pretty close.

We use two callbacks here: 'game_handler' to capture keyboard events, and 'sys_timer_z_' to capture timer events when the user uses the 'wait for game over' option.


<lang J>require'~addons/ide/qt/gl2.ijs'
<lang J>require'~addons/ide/qt/gl2.ijs'