Introduction to Programming in Java

Alyce Brady and Pamela Cutter, Kalamazoo College, 2003, 2005

Archaeological Dig Simulation Project


In this project you will design and implement an Archaeological Dig Simulation that behaves a lot like the solitaire computer game MineSweeper.

Problem Specification:

Design a program to simulate an archaeological dig. The goal is to dig near ancient artifacts buried in the soil to loosen them and make it easy for the archaeologists to extract them manually. If you dig too close to the artifacts, though, you will damage them. The archaeologists have mapped out the dig site as a grid. The chemistry department has come up with a soil test to see whether there are artifacts close by, either in the current grid location or in an adjacent location. Your job is to dig in the grid blocks without artifacts and to leave the blocks with artifacts alone. Since this is such an important project, the archaeological team wants their students to be able to practice this before they get to the dig. You are going to write the simulation that the students can use to practice.

Program Specification:

Classes to Get Started:

For this project, you will be provided with two classes that will implement your graphical user interface: ArchSimGUI and ArchSimDisplay.  The user interface responds to certain user actions, such as pressing the Restart button or clicking the mouse within a cell in the grid, but it does not know what actions to perform when these events occur.  It requires a class with which it can interact that does know what actions to perform.  The ArchSimulation interface specifies a set of methods that the GUI can invoke.  The display class also has some special requirements; it assumes that the objects in the grid are not just normal GridObject instances, but that they are instances of a class that has an isVisible method so that the display can tell which objects in the display it should show and which should remain hidden.  The skeleton ArchSimGridBlock class has such a method, although it does not have any other functionality that you might eventually want for the objects in your grid.  Finally, to make it easier for you to get started and to test your program at every step of the way, we have provided two classes, ArchSimApp and DummyArchSimulation, that will allow you to compile and "run" the other classes we have provided. You can download all of these classes at once by downloading Archaeology.zip.  You will also need to download the Java Archive library for the Grid Package (grid.jar), since the Archaeology Simulation program uses that.

In summary, the files being provided to you are:

Suggestions for Proceeding: