O'Reilly logo

Creating Mobile Apps with Sencha Touch 2 by Bryan P. Johnson, John Earl Clark

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The game board logic

The game logic will function as follows:

  1. A player clicks on the Start Turn button.
  2. The game responds with an alert telling the player it is black's or red's turn.
  3. The player taps a piece.
  4. The game checks that a valid piece was tapped and stores the information in the currentMove variable.
  5. The player taps a destination square.
  6. The game checks if the destination is valid and stores the information in the currentMove variable.
  7. The player can then tap Finish Turn! to complete the turn or tap additional squares if jumping multiple pieces (finally tapping Finish Turn! when all moves for the turn are complete).
  8. Once the player taps Finish Turn!, the system removes any jumped pieces, removes all decorations for the move, and stores the move ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required