Convert functions to methods of 'game' object