O'Reilly logo

Building Apple Watch Projects by Stuart Grimshaw

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

Interface Controller

Next we go through the same process with the interface controller, namely planning out what we think it will need to do (remembering that an incomplete plan is good enough at this stage) and stub the methods that we expect to need.

Planning the interface

The InterfaceController class will act as the CONTROLLER of communication between the user interface—the VIEW—and the actual implementation of the game—the MODEL. It needs to inform the player what the game is doing and inform the GameLogic class what the player is doing.

So, very roughly, the controller will need to do the following:

  • Accept the player's instruction to start the game
  • Flash the colors in sequence
  • Accept player input
  • Enable and disable user input as required
  • Show results ...

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