O'Reilly logo

Programming Lego Mindstorms NXT by Owen Bishop

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

Chapter 13. Games Robots Play

Introduction

All the robots in the Mindstorms kit can be adapted in some way or other to play a game against a human opponent, or to play games against themselves. We may need to adapt the rules and mechanics of the game to the robot as well. The programs in this chapter are written with one particular robot in mind, but it is not too difficult to adapt them to a different robot. Most of the programs are full-length games programs, and there are a few shorter programs that you may find useful when designing games of your own.

Maze Runner—Version 1

Taking the programming of Pathfinder a stage further, this program controls a robot as it runs a maze. The maze consists of a path that branches repeatedly into two, ...

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