Calibration Programming Assignment

Objective

The objective of this assignment is for you to demonstrate your programming ability using an object-oriented programming language of your choice. If the langage is not from the list: Java, C++, or C#, please check with me (Charlie) first

The Problem

Most of you are probably familiar with Conway's "Game of Life". For this assignment you will implement a variation that uses a hexagonal grid rather than the conventional rectangular grid. A description of one variant that follows essentially the same rules as in Conway's original can be found here http://www.mathrecreation.com/2012/10/hex-life.html. Another variant that expands the notion of neighbor is described here http://www.well.com/~dgb/hexrules.html.

I would like you to create a program that, at the very least, supports both of these variations. The variation selected will be specified as a command line argument. Your program must have a plain text interface and optionally may provide a GUI. Your program should recognize the following command line arguments:

-12: use the 12 neighbor rules (default is the 6 neighbor rules)

-size n: specify the size of the grid to be n X n (default is 100)

-f filename: read in the initial configuration from the specified file (see below for input file format)

-g n: specifiy the number of generations to simulate (default is 10)

-p n: specify that every nth generation should be printed (for plain text output only, default is 1)

-i p: specify the probabilty of a cell being alive in the initial configuration if no file is provided (default is .5)

If no input file is specified then the cells are filled randomly. The format of the input file is n rows of n characters (or more - extra rows or characters will be ignored). Each row is one row of the grid. A dead or empty cell is specified by a dot '.'. A live cell is specified by an 'X'. For plain text output the odd number rows (the first row is number 0 as is typical for arrays) will be displayed offset to the right by one space and each cell is separated from the next in a row by a space, to simulate the hexagonal arrangement. For example, an initial input file for a 5X5 world of all alive would be:

XXXXX
XXXXX
XXXXX
XXXXX
XXXXX

As the intial generation, this would be output as:

X X X X X
 X X X X X
X X X X X
 X X X X X
X X X X X

You may optionally provide a graphical user interface of your own specification. The goal of this assignment is to demonstrate some proficiency with OOP so you are encouraged to look for opportunites to factor the solution into multiple classes utilizing inheritance and/or generics. Although not part of this exercise, the program should be designed to facilitate experimenting with different rule sets.