playing.demo

Demonstrate the features of the package with a small interactive execution

Since this module may be called from anywhere and even the package might not have been installed yet, the package path is inserted into the sys.path if missing. From that point on, imports like source.core work fine.

In order to demonstrate the correct usage of the package objects (e.g. the Nim class), i.e. referring to it as nimgame.Nim, regardless of where this class is actually created in the source, we create simulated namespace, fill it up with the objects imported from their actual place, and call it nimgame.

playing.demo.run()[source]

Run the interactive CLI demo