The instruction 'close()' does not close the board window or exits the program. It only terminates the run loop and passes the control to the code following 'baard.show()'.
Here's is a sample code:
`
from game2dboard import Board
from time import sleep
def onkey(key):
if key == 'Escape': b.close()
b = Board(4,4)
b.on_key_press = onkey
b.show()
print("Code continues ...")
sleep(3) # During this pause, the board window is still open
Output:
Code continues ...`
The instruction 'close()' does not close the board window or exits the program. It only terminates the run loop and passes the control to the code following 'baard.show()'.
Here's is a sample code:
`
Output:
Code continues ...`