Students must submit their critter by 11 pm Wednesday (5/31) to participate. The in-class tournament will be run as a series of elimination rounds. Each elimination round will take place in a world that is 65 wide and 55 high and will start with:
The simulation will be run for 5000 steps. The critter with the highest count at that point will be declared the overall winner. That critter will then be removed from the simulation and it will be run again for 5000 steps to determine a second place winner. This process can be continued to determine a third place winner, fourth place winner, and so on.
We will run a qualifying contest in advance to pick 16 finalists. In the tournament we run during lecture, we will start with these finalists involved in four rounds. The eight winners will then compete in two rounds. This will lead to the final four who will compete in the final round.
We will run one tournament for section A at 11:30 and another tournament for section B at 1:30. Students can enter only the tournament for the section they are registered for and can enter only one critter class. Contestants should pick a name for their critter that is likely to be unique (e.g., PorterHusky). In each lecture prizes will be given out to the top four winners, but you have to be present to win a prize.
The finalists will be picked through a precontest. We will generate all combinations of three contestants and put them in a world that matches the description above (including the Bear, Lion, Giant, FlyTrap, and Food critters listed above). For each combination of three contestants, we will run a simulation for 5000 steps and add the final critter counts to each critter's total score. The critters with the highest totals will be included in the lecture contest.
Any submission that is found to be circumventing the spirit of the contest will be disqualified (e.g., trying to access the critter model or critter frame, trying to read or write files, trying to open a network connection, trying to exit the program, including offensive images or language, etc). Submissions will also be rejected if they take an inordinate amount of time to execute.
You are allowed to turn in a different critter for the contest than what you turned in for homework 8. Specifically, you have to turn in a file through the Catalyst dropbox below for the tournament, not the normal Grade-It turn in.
You can create interesting behavior by using static fields. When you add the "static" keyword to a field, there will be just one version of that field that is shared by all objects of the class. For example, you could make an ArrayList that is shared by all of your critters. But static fields pose a problem for running simulations repeatedly because you want to start with appropriate values for each new simulation. If you are going to use static fields, you should include a static method called initStatic that takes no arguments. If it exists, the simulator will call this method once before the beginning of each simulation. You can find an example of a critter class that uses a static field by looking at Food2.java, a variation of the Food critters that display themselves with text such as "7 of 9" to indicate that this is the 7th such critter out of a total of 9 ever created.
Submit your critter class here:
You must include your name in the comments for your husky class and you may not use the name "Husky" for your class. Make sure that your critter class compiles after you change the name (remember that the constructor name must match the class name). Submissions are due at 11 pm on Wednesday.