This is an old version of this course, from Winter 2013-2014. A newer version is avaliable here.
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.
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 this 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).
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:
Acknowledgement
This lab developed by Dr. Hornick