1902hw1writeup

1902hw1writeup - CSci 1902 Homework 1 In this assignment...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSci 1902 Homework 1 January 27, 2010 In this assignment you will be working with an implementation of Conway's Game of Life. Your task will be to implement the game's logic and a variation of it. For this assignment you will need the les available from the course website. The purpose of this assignment is to explore some Java structures and become familiar with implementing logic in Java. The Game of Life (Conway's Game of Life) The Game of Life is a mathematical game and computer simulation devised by John Conway. It simulates the behavior of populations following simple rules. Life is played on a grid of cells. Each cell can be either dead or alive. The game progresses in a series of iterations, called generations. In each generation, the value of a cell (whether it is alive or dead) is determined by the value of that cell and its eight neighbors (cells that are directly horizontally, vertically, or diagonally adjacent) in the previous generation, using the following rules: • If a living cell has less than 2 living neighbors, it will die (of loneliness) • If a living cell has more than 3 living neighbors, it will die (it's overcrowded) • If a dead cell has exactly 3 living neighbors, it will come to life (it is born) • Otherwise, the cell's value will not change For more information on The Game of Life, refer to Wikipedia article Conway's Game of Life (http://en.wikipedia.org/wiki/Conway's_Game_of_Life). Overview In this assignment you will have the following tasks: • Implement the rules for Conway's Game of Life • Implement a slight variation to Conway's rules, called Seeds • Answer questions related to the implementation of the Game We have also provided JUnit les for testing the game of life, so you can check the correctness of your implementation. Some of the tests will initially fail, since a method you will need to implement in the project is not working correctly at this point. 1 Files The les for this assignment are available on the course website at: http://www-users.itlabs.umn.edu/classes/Spring-2010/csci1902/homeworks/1902hw1.zip Download this archive and unpack it somewhere on your computer. To unpack the archive use theDownload this archive and unpack it somewhere on your computer....
View Full Document

{[ snackBarMessage ]}

Page1 / 4

1902hw1writeup - CSci 1902 Homework 1 In this assignment...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online