# ALL IMPORT STATEMENTS import sys import ... def get_time_in_ms(): """ Time is handled differently on microbit than on regular computers. Call this function to get current (system) time. """ if sys.platform == 'microbit': try: return time.ticks_ms() except Exception as e: print("An error occurred on microbit:", str(e)) else: try: return time.time()*1000 except Exception as e: print("An error occurred on Windows/Mac/Linux/... (not microbit):", str(e)) class Player: def __init__(self,...): pass def update(self,move): """ move = 1 -> move to right 1 step move = -1 -> move to right 1 step """ pass class Asteroid: def __init__(self,...): pass def update(self): """ if enough time has passed, asteroid's y position increases by 1 """ pass class Game: def __init__(self,...): # pass game settings as parameters .... self.player = Player(...) # create player and attache to Game-class as attribute self.asteroids = [] # also create empty list for asteroids .... def spawn_asteroids(self): """ Checks if enough time has passed s.t. new asteroid is allowed to spawn. If it is, new asteroid spawns with given probability """ pass def update_asteroids(self): """ updates position of all asteroids """ pass def player_is_colliding(self): """ checks if player is colliding with an asteroid returns False or True """ pass