Object oriented program in java to play game of life


Questions:

Object Oriented Program in JAVA to play Game of Life

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
JAVA Programming: Object oriented program in java to play game of life
Reference No:- TGS01937747

Now Priced at $20 (50% Discount)

Recommended (95%)

Rated (4.7/5)