Home > Life

Life

Life is a project mainly written in ..., it's free.

A simple implementation of Conway's Game of Life in Java

This directory contains a Java implementation of Conway's Game of Life.

To compile: javac GameOfLife.java

To run: java GameOfLife < [input file] Where [input file] is a txt file containing the desired initial pattern, where 0 corresponds to dead cells, and 1 corresponds to live cells. The pattern must be prefixed by the dimensions of the pattern.

The input file 'glider.txt' contains a glider gun.

This program uses Sedgewick and Wayne's standard libraries, used in COS 126 at Princeton University. These libraries are available at http://introcs.cs.princeton.edu/java/stdlib/