TopGear Battlecruiser Demo


In [1]:
# Cross-notebook include shim
with open("nbinclude.ipynb") as nbinclude_f: # don't rename nbinclude_f
    import IPython.nbformat.current
    get_ipython().run_cell(IPython.nbformat.current.read(nbinclude_f, 'json').worksheets[0].cells[0].input)

In [2]:
nbinclude("battlecruiser_widget")



In [3]:
bc=BattleCruiser()

In [4]:
bc.view

In [18]:
bc.cmd(10,0)

Awesome!

starcraft is great! everybody should own one!


In [81]:
nbinclude('gamepad_widget')



In [82]:
widgets.interact(drive,
                 x=JoystickFloatWidget(axis_id=1),
                 z=JoystickFloatWidget(axis_id=2))


Out[82]:
<function __main__.drive>

In [84]:
widgets.interact(drive,
                 x=4,
                 z=1)

In [83]:
def drive(x,z):
    bc.cmd(x,z)

In [ ]: