Chapter 7

A Case Study: A Billiards Game

In our second case study, we will develop a simple simulation of a billiard table.1 The program is written in Delphi Pascal.2 As with the eight-queens program, the design of this program will stress the creation of autonomous interacting agents working together to produce the desired outcome.

1. The game implemented by the program described in this chapter does not correspond to any actual game. It is not pool or billiards but simply balls moving around a table consisting of walls and holes.

2. Discussion of Delphi Pascal is complicated by the fact that graphical user interface elements of Delphi programs are constructed visually, using the integrated development environment. This style of design will ...

Get An Introduction to Object-Oriented Programming, 3rd Edition 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.