A Javascript class game skeleton