- Building Apple Watch Projects
- Stuart Grimshaw
- 304字
- 2021-07-16 13:00:12
Chapter 3. C-Quence – A Memory Game
We will be crafting an app that is a little more entertaining by using everything that we covered in Chapter 1, Exploring the New Platform, adding code which uses basic Swift features that most developers will find familiar and will address some of the topics that face the developer in creating software for a platform that presents some unique challenges.
C-Quence will be a game that challenges players' ability to memorize a sequence of colors generated by the app.
It is a game to be played in short bursts rather than prolonged activity, as one of the first things that becomes clear when using a physical device is that the watch is unsuited to tasks that take more than a short time to complete, which we will keep in mind as we look at the top-level design of the app.
Bear in mind that, although this is a very modest app in terms of the amount of coding it takes to bring it to completion, we still want to adhere to what some refer to as Best Practice (and others prefer to think of as simply learning from others' mistakes without the schadenfreude).
Here is a brief overview of how we will approach the various steps of development:
- Plan the flow of the app
- Set up the Xcode project
- Build the interface in Interface Builder
- Create the game logic class
- Implement the Interface Controller logic
- Hook up the classes and interface
The code presented in this chapter will reside fully on the watch, needing no support from the iPhone companion app. It will not be a complete and functioning app, that will come in the following chapter, but it will be a robust framework and we will have learned some important principles of software design.
- 計算機網絡
- 測試驅動開發:入門、實戰與進階
- Mastering OpenCV Android Application Programming
- SQL學習指南(第3版)
- SQL Server 2012數據庫技術及應用(微課版·第5版)
- RTC程序設計:實時音視頻權威指南
- Python王者歸來
- Microsoft System Center Orchestrator 2012 R2 Essentials
- 自然語言處理Python進階
- ElasticSearch Cookbook(Second Edition)
- Scratch趣味編程:陪孩子像搭積木一樣學編程
- Java程序設計與項目案例教程
- Struts 2.x權威指南
- OpenCV Android開發實戰
- Microsoft HoloLens By Example