Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.4 kB
1
Indexable
Never
########################################################################
#        HELPER FUNCTIONS                                              #
########################################################################

def set_stage():
    """ Sets up the stage and introduces the game """

    stage.set_background("space")
    sprite = codesters.Sprite("astronaut1")
    sprite.set_say_color("white")
    sprite.say("Only click on the aliens and ufos!")
    stage.wait(2)
    sprite.say("Don't click on the astronauts!")
    stage.wait(2)
    sprite.hide()


########################################################################
#        MAIN FUNCTION                                                 #
########################################################################
def add_click_event(sprite, my_display, my_dictionary):
    """ Attaches a click event to a sprite """
    
    
def play_game(my_display, my_dictionary):
    """ Creates an interval event to start the game """
    image_list = list(my_dictionary.keys())
    print(image_list)

    
    

def main():
    """ Sets up the program and calls other functions """
    set_stage()
    global score
    score = 0
    #my_display = codesters.Display(my_var, x, y)
    my_display = codesters.Display(score, 0, 175)
    my_dictionary = {"alien1": 10, "alien2": 20, "ufo": 5}
    play_game(my_display, my_dictionary)






    
    
main()