O'Reilly logo

Invent Your Own Computer Games with Python , 4th Edition by Al Sweigart

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

13SONAR TREASURE HUNT

image

The Sonar Treasure Hunt game in this chapter is the first to make use of the Cartesian coordinate system that you learned about in Chapter 12. This game also uses data structures, which is just a fancy way of saying it has list values that contain other lists and similar complex variables. As the games you program become more complicated, you’ll need to organize your data into data structures.

In this chapter’s game, the player drops sonar devices at various places in the ocean to locate sunken treasure chests. Sonar is a technology that ships use to locate objects under the sea. The sonar devices in this game tell the player ...

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