Page 135 - PortGPT_V2.1_C6_Flipbook
P. 135

https://www




                      C.   Create the game "Chase the Apple" in makecode. Add two sprites, one will be a Player
                          sprite and another will be an Apple sprite.

                          Objective of the game:
        https://www                                                                                                     https://www
                          •    To chase and catch the wandering apple and collect as many points as possible before
                               the time runs out.

                          •    Every time the apple is caught, points are added, and the timer is restored.
                          Code:


       https://www                                                                                                     https://www


































                          Output:












       https://www                                                                                                     https://www















                                                                                                          Project  133
                        https://www
   130   131   132   133   134   135   136   137   138   139   140