O'Reilly logo

Java™ ME Game Programming, Second Edition by Ph.D. Martin J. Wells, Ph.D. John P. Flynt

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

DasherCanvas

The DasherCanvas class is the largest class in the set of classes that make up the Diamond Dasher game. This class allows you to create a Sprite object that dashes after diamonds (giving the game its name). A TiledLayer object furnishes the background, which consists of a set of tiles that provide a crude representation of a cave, along with a number of lines, created using the Graphics::drawString() method, that furnish the score of the game and reports about its progress. The DasherCanvas class contains one inner class, DTimerTask, which specializes the TimerTask class and serves to define a Timer object used to control the duration of the game. The class also provides a Thread object, which serves to govern the frame rate of the ...

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