Page 93 - Digicode_AI_class_4
P. 93

Similarly, we can code our bot further as follows:









                          2  Click on plus sign
                          to code your bot.











                              Events from the WHEN Section will be used to start the 'DO'
                              section.
                              When statements in the WHEN part become true, the actions in the
                              DO section take place.





                        3  Select Keyboard
                       from the menu.









                                                    4  Click on the
                                                    plus sign again
                                                    and select WASD.









            Now we will add an opponent to our game.










                                                                                5  Right click on the
                                                                               cycle and select Copy
                                                                               from the popup menu.





                                                                         Introduction to Kodu Game Lab    91
   88   89   90   91   92   93   94   95   96   97   98