Purchase Solution

Object Oriented Program in JAVA to play Game of Life

Not what you're looking for?

Ask Custom Question

Consider a rectangular matrix of cells, each of which may contain an organism. If the matrix is viewed as extending indefinitely in both directions, then each cell has eight neighbors, the eight cells surrounding it. In each generations births and deaths occur according to following rules:
1. An organism is born in any empty cell having exactly 3 neighbors ( cells with organisms in them).
2. An organism dies from isolation if it has fewer than two neighbors.
3 An organism dies from overcrowding if it has more than 3 neighbors.
4. All other organisms survive.

Write an object oriented program in Java to play the Game of Life and investigate the patterns produced by various initial configurations. Some configurations die off rather rapidly; others repeat after a certain number of generations; others change shape and size and may move across the matrix; and still others may produce "gliders" that detach themselves from the society and sail off into space.

Please provide an algorithm as well as source code.

Purchase this Solution

Solution Summary

Objects oriented programs in JAVA to play the Game of Life is determined.

Solution Preview

Attached are the following three redundant attachments (redundant just in case you need it in a certain way for build and run purposes in your environment).

1. gameoflifesimulation.zip
Note: Includes "package gameoflifesimulation;" declaration at the top of the three classes.

2. gameoflifesimulation_without_package_declaration.zip
Same thing as above with the package declarations removed. Some students prefer it this way ...

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Basic Networking Questions

This quiz consists of some basic networking questions.

Javscript Basics

Quiz on basics of javascript programming language.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.