-
Notifications
You must be signed in to change notification settings - Fork 0
/
readMe.txt
58 lines (54 loc) · 2.23 KB
/
readMe.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Project:
Simulate Game of Life
The Game of Life is set in an infinite two-dimensional grid inhabited by “cells”. Every cell interacts with up to
eight neighbours, which are the cells that are horizontally, vertically, or diagonally adjacent.
From an initial seed grid the game "evolves" one iteration at a time. An iteration applies rules to the grid to
determine its next state. These scenarios are:
1. No interaction:
Given a game of life
When there are no live cells
Then on the next step there are still no live cells
2. Underpopulation
Given a game of life
When a live cell has fewer than two neighbours
Then this cell dies
3. Overcrowding
Given a game of life
When a live cell has more than three neighbours
Then this cell dies
4. Survival
Given a game of life
When a live cell has two or three neighbours
Then this cell stays alive
5. Creation of Life
Given a game of life
When an empty position has exactly three neighbouring cells
Then a cell is created in this position
Assumption:
1. When game start, alive cells exist only on 1/3 centred output window.
Pre-requisites:
JDK 8 -> Use as is
For JDK 11, do following:
1. Open website and download Java SDK w.r.t operating system.
JavaFX https://gluonhq.com/products/javafx/
2. Open IntelliJ IDEA
3. Configure -> Project Defaults -> Project Structure -> Global Libraries
4. Click "+", -> Java -> Select following:
From above mentioned download, Unzip folder -> Java-SDk-11-> add all Jar files.
5. Set a meaningful name. i.e. JavaFX-11
6. Open project on IntelliJ
7. Right click project -> Open Module Setting -> Project
Make sure that Project SDK and Project Language level should be same.
8. Select Global Libraries -> Right click JavaFX-11 -> Add to modules -> OK ->OK
9. Open project -> right click src folder -> New -> module-info.java -> add following
module GOL{
requires javafx.fxml;
requires javafx.controls;
opens sample;
}
Built with:
1. IntelliJ IDEA
2. JDK 8
3. JavaFX SceneBuilder 2.0
Author:
Faiza Mazhar