• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 19. Don't Fall! > Points to Remember

Points to Remember

  • Make use of room variables to keep track of which players have arrived.

  • Using the sendMove() method of the ElectroServerAS object, you can easily send information to your opponent.

  • The sendMove() function allows you to send objects. It is a good idea to use a property like type on the object, to concisely describe why the object is being sent. For instance, in checkers you might have a special move for making a checker a king. In this case the type property would be "king". For other moves it would probably just be "move".

  • There are two characters used in this game, automatically chosen based on which player you are.

  • The world.char reference is used to point to the character whose turn it is.

  • The fall() function determines if a character is on a tile. If this is the case, the function tells the character to fall, and the game is over.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint