Reading: Chapters 8 and 9.
Due: At 8:00am, Friday February 23, 2001, submit is turned off automatically. Work turned in after that time will not be accepted for grading.
BorderLayout, with the world in
the center, and the Next generation button on a border.
The menu bar should include a File menu with the option
Exit, and a LifeForm menu with the options
Empty, Grass, Fox,
and Rabbit.
When the program starts up, it should read the initial configuration of the world from the console. The startup file will consist of one integer, size, followed by size lines of size characters. (The following was changed on 2-15-01. If you already implemented input using the earlier specification of e, g, f, or r, then you may use it but I would prefer it if you wouldn't mind making the minor change as follows.) The characters will be one of ., G, F, or R (I find this makes the input file much more pleasing to the human eye). There will be no white space between the characters on a single line, and there will be one line of charactes for each row of the world. Here is a sample input file.
10 .......... .......... .......... .......... ...GGG.... ...FFF.... ....RRG... .......... .......... ..........
Be sure and use the swing based GameBoard example (a slight modification of the example in section 9.7 of the book) as a starting point.
Here is my solution displayed as an applet.
You do not need to use a fancy tool. NEAT, hand drawn diagrams are fine. You may bring your diagrams to class on the day the assigment is due. If you want to submit the diagrams electronically, they can be in postscript, pdf, gif, jpg, or MSWord.