SE-2811 Software Component Design
Lab 1: Making a Smarter Bee

The objective of this lab is to add an additional "SmartBee" class to the game that implements a better strategy for accumulating points. You'll be provided with the strategy you are to implement on the day of lab.

Assignment

Download the zipfile containing the base application from the course website. The class diagram representing this application's structure is as follows (the different colors indicate different packages):

You'll be adding your SmartBee class in the game.characters.<yourname> package (Flower and Bee are in game.characters, while the other classes are in the game package). To help you understand the operation of the application, study the existing Bee class, particularly the planMove() method. Your SmartBee class will be providing a completely different move-planning strategy vs. what you see there. The planMove() method is called whenever the game framework wants your SmartBee to plan where to go during it's next turn. The framework provides a List of all other GameCharacters on the board, and you can examine them (i.e. determine their location on the board, and their current score) in formulating your move strategy.

For the Tuesday lab section: implement a strategy that moves the SmartBee to the closest Flower currently having at least 3 points. If no such Flower exists, do not move (also: ignore other Bees on the board).

For the Thursday lab section: instead of a SmartBee, create a GreedyBee class that implement a strategy that moves the bee to the Flower with the greatest number of  points. If no Flowers exists, do not move (also: ignore other Bees on the board).

To incorporate your bee into the Game, look at that class's createBees() method. You'll have to create one or more instances of your bee there. The following sequence diagram may also help you understand the entire operation of the program better:

Lab Submission (due by end of lab)

Your assignment will consist of:

Submit your assignment by committing it to your SVN repository in a top-level project named "Lab1" (no tag is needed). The image file should be directly in the Lab1 folder, but all code should be in a subfolder named "src". Do not commit any binary files, and do not commit the EA project file.