Advertisement
Guest User

Untitled

a guest
Feb 26th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. import java.util.Scanner;
  2. import java.util.Random;
  3.  
  4.  
  5.  
  6. public class Milestone1 {
  7.  
  8.  
  9.  
  10. public static final int WORLD_ROWS = 8;
  11. public static final int WORLD_COLUMNS = 10;
  12. public static final char ALIVE = '@';
  13. public static final char DEAD = '.';
  14. public static final int SEED = 428;
  15. public static final double CHANCE_ALIVE = 0.25;
  16.  
  17.  
  18. public static void main(String[] args) {
  19.  
  20.  
  21. Scanner scnr = new Scanner(System.in);
  22.  
  23. System.out.println("Welcome to Conway's Game Of Life");
  24. System.out.println("--------------------------------");
  25. System.out.println("1)Glider 2)Beacon 3)Beehive 4)R-pentomino");
  26. System.out.println("5)Random 6)Custom or 7)Exit");
  27. System.out.println("Choose a pattern: ");
  28. int userPattern = scnr.nextInt();
  29. if (userPattern == 7)
  30. {
  31. System.out.println("----------------------------");
  32. System.out.println("End of Conway's Game Of Life");
  33.  
  34. }
  35.  
  36. boolean [][] world = new boolean[WORLD_ROWS][WORLD_COLUMNS];
  37.  
  38.  
  39. /**for (int i = 0; i < WORLD_ROWS; i++) {
  40. for (int j = 0; j < WORLD_COLUMNS; j++) {
  41. System.out.println(world[i][j]);
  42. }
  43.  
  44. }*/
  45.  
  46. if (userPattern > 0 && userPattern <= 6) {
  47.  
  48. System.out.println("");
  49.  
  50. System.out.println("Fix me + cells are alive.");
  51.  
  52. System.out.print("Press Enter for next generation, 'end' to stop: ");
  53. int userInput = scnr.nextInt();
  54.  
  55. }
  56.  
  57.  
  58. }
  59.  
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement