- 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 Visual Studio 2017
- 深入理解Bootstrap
- Java Web基礎與實例教程(第2版·微課版)
- AngularJS Web Application Development Blueprints
- 從0到1:HTML+CSS快速上手
- 你不知道的JavaScript(中卷)
- 微信小程序開發解析
- C語言程序設計學習指導與習題解答
- Node.js Design Patterns
- 速學Python:程序設計從入門到進階
- SQL Server實用教程(SQL Server 2008版)
- ASP.NET程序開發范例寶典
- Learning Docker Networking
- 大學計算機基礎
- Deep Learning with R Cookbook