Introduction and Connections
Use the first couple of days of class to get students ramped up with the system. The goal of this section is to get students familiar with the system and setup to have a ship successfully connect to the server and have it execute a command.
Make sure each student can successfully register a ship and appear on the server before continuing.
It is a useful first exercise for the teacher to understand a little bit about how Space Battle configuration works. To do so, you can simply modify the machine_fullscreen.cfg file included with the server to add additional sections to increase the number of objects in the world:
[Asteroid] number = 8 [Planet] number = 3 [BlackHole] number = 1 [Nebula] number = 2
This helps create a greater visual impact when first introducing students to Space Battle. This can then be used on the command-line:
First, get students to start the IDE and add the jars to their classpath (see Client Setup Instruction supplemental document for more info).
Then introduce the BasicSpaceship abstract class and have students implement the registerShip method and the getNextCommand method (return an IdleCommand at first).
After most students have connected, introduce the RotateCommand and start talking about the dynamics of how the system calls the ship responds with a command for the server to execute.