
' Controllers
' alternative version, support for:
' terminal using inkey$

' this won't be as good a controller as a USB
' keyboard or a dedicated controller, but you can use it for testing

#include "terminal-controller.inc"

Controllers.init 1

do
  print @(10,10) "Status: ";

  pause 100 ' give a chance to for buttons to repeat

  if Controllers.Left() then
    print "LEFT ";
  else
    print "____ ";
  endif
  if Controllers.Right() then
    print "RIGHT ";
  else
    print "_____ ";
  endif
  if Controllers.Up() then
    print "UP ";
  else
    print "__ ";
  endif
  if Controllers.Down() then
    print "DOWN ";
  else
    print "____ ";
  endif
  if Controllers.ButtonA() then
    print "BUTTON ";
  else
    print "______ ";
  endif
  if Controllers.ButtonB() then
    print "AUX ";
  else
    print "___ ";
  endif


loop
