Hmm.
Try the W3 Schools game example here:
W3 Schools Game Example