Write an object oriented program in java to play the game


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.

Solution Preview :

Prepared by a verified Expert
Game Theory: Write an object oriented program in java to play the game
Reference No:- TGS01254193

Now Priced at $20 (50% Discount)

Recommended (91%)

Rated (4.3/5)