Instructions

  1. This world can be represented using a JSON object which has the following format -
    1. The object is an array of array of numbers
    2. The inner array in the object contains 5 numbers which have the following limits
      • The first and second numbers should be greter than or equal to 0 and less than or equal to 1000
      • It is recommended that the third and 4th numbers be in between -100 and 100 although it is ont a strict rule
      • The 5th number should be one of 0, 1 or 2
      • There is no limit to the 6th and 7th numbers
      • Any other numbers will be ignored
    3. There arent any checks for the numbers being out of limits, so there may be unexpectd results if such an input is provided. If you wish to make this more interesting you may consider those results as on of the ways this world behaves (even though those are not the wasy the author wanted the universe to behave).
  2. Each state of the universe is the function of the previous state of the universe
  3. A drawing of a state of the universe can be generated using the "Draw" button to visualize the state of the universe
  4. You may enter a state of the universe in the text box and do one of the following things
    1. Draw that state of the universe using the "Draw" button
    2. Get the next state of the universe based on this state using the "Get Next State" Button. This will also draw the next state of the universe
    3. Keep on drawing newer generations based on the first generation you put in using the "Play" button. The speed of this can be controlled by the Generations Per Second text box
    4. Checking the afterimage checkbox keeps a faded after image of the previous generations on the board
  5. Each generation of the universe is logged in the console
  6. If you do not want to use the UI you can use this using the console. the nextGen([[][]...]) function takes a JSON and gives the next state
The code to drive the usiverse is not hidden, you can figure out how the universe works using the script.js file. But that would take out all the fun