Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////////////////////////////////////////////////////////////
- ///
- /// Contents: Game of Life
- /// Author: Chris Boehm
- /// Date: October 2012
- ///
- //////////////////////////////////////////////////////////////////////
- package Life;
- import java.awt.* ;
- import javax.swing.* ;
- import java.util.Random ;
- import java.util.Date ;
- public class GameofLife
- {
- public static int width = 200, height = 200, pause = 1000 ;
- static int[][] lifeMatrix;
- public static void main(String[] args)
- {
- lifeMatrix = new int[width][height];
- Random Randomizer = new Random() ;
- JFrame frame = new JFrame("Game of Life") ;
- PaintPanel p = new PaintPanel(width,height) ;
- frame.getContentPane().add(p) ;
- frame.pack() ;
- frame.setVisible(true) ;
- for(int i = 0; i<10; i++)
- {
- for (int j = 0; j<10; i++)
- {
- lifeMatrix[i][j] = Randomizer.nextInt(2);
- }
- }
Add Comment
Please, Sign In to add comment