14. Games and object hierarchies

Image

What you will learn

Over the past few chapters, our focus has changed from “how to tell the computer to do stuff” to “how to manage complexity.” We started by considering the actions a program can perform and then moved on to working with collections of data and creating structures and classes that help encapsulate data into meaningful objects. In this chapter, you’ll expand your knowledge of object-oriented techniques by building a game. The techniques you’ll learn can be applied far beyond games, but games are very useful place to explore them.

We’ll first look at inheritance, a technique that can save you from ...

Get Begin to Code with C# now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.