|
3 | 3 | This is the user manual of Conway Game of Life simulator.
|
4 | 4 | You may find detail program usage and error message explanation here.
|
5 | 5 |
|
| 6 | +## Examples Args |
| 7 | + |
| 8 | +Please replace `...` with commands corresponed to your OS specify in `readme.md`. |
| 9 | + |
| 10 | +```bash |
| 11 | +... tests/example1.txt tests/result/example1 21 |
| 12 | +... tests/example2.txt tests/result/example2 5 |
| 13 | +... tests/example3.txt tests/result/example3 50 |
| 14 | +``` |
| 15 | + |
| 16 | +### Linux Example |
| 17 | + |
| 18 | +Here is how linux system should run the args, an example. |
| 19 | + |
| 20 | +```bash |
| 21 | +sh scripts/run.sh |
| 22 | +sh scripts/run.sh tests/example1.txt tests/result/example1 21 |
| 23 | +sh scripts/run.sh tests/example2.txt tests/result/example2 5 |
| 24 | +sh scripts/run.sh tests/example3.txt tests/result/example3 50 |
| 25 | +sh scripts/run.sh tests/invalid1.txt tests/result/example1 1 |
| 26 | +sh scripts/run.sh tests/invalid2.txt tests/result/example1 1 |
| 27 | +sh scripts/run.sh tests/invalid3.txt tests/result/example1 1 |
| 28 | +sh scripts/run.sh tests/invalid4.txt tests/result/example1 1 |
| 29 | +sh scripts/run.sh tests/invalid5.txt tests/result/example1 1 |
| 30 | +sh scripts/run.sh tests/invalid5.txt tests/result/example1 -1 |
| 31 | +``` |
| 32 | + |
| 33 | +### Bad Examples |
| 34 | + |
| 35 | +```bash |
| 36 | +... tests/invalid1.txt tests/result/example1 1 |
| 37 | +Err: [seedFile] Invalid row/col, must be positive integer larger than 2 |
| 38 | +... tests/invalid2.txt tests/result/example1 1 |
| 39 | +Err: [seedFile] Invalid row/col, must be positive integer larger than 2 |
| 40 | +... tests/invalid3.txt tests/result/example1 1 |
| 41 | +Err: [seedFile] Unexpected cell type 2 |
| 42 | +... tests/invalid4.txt tests/result/example1 1 |
| 43 | +Err: [seedFile] Unexpected col length at row index 1 |
| 44 | +... tests/invalid5.txt tests/result/example1 1 |
| 45 | +Cannot invoke "String.split(String)" because "<local1>" is null |
| 46 | +... tests/example3.txt tests/result/example1 -1 |
| 47 | +Err: [input] step -1 is invalid |
| 48 | +``` |
| 49 | + |
| 50 | +## Screenshot |
| 51 | + |
| 52 | +Here is an example screenshot of how it looks like when program runs, we will talk about each arguments in the following sections. |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | +### Basic Usage |
| 57 | + |
| 58 | +If incorrect/missing arguments given, the following message will occur. |
| 59 | + |
| 60 | +```bash |
| 61 | +$ sh scripts/run/sh |
| 62 | +Args: <input> <output> <step> |
| 63 | +``` |
| 64 | + |
6 | 65 | ## Inputs
|
7 | 66 |
|
8 | 67 | In this section, program usage will be presented, as well as input file format.
|
@@ -97,31 +156,4 @@ When reading a specific cell in the seed file, program cannot recognize its stat
|
97 | 156 |
|
98 | 157 | ### `Cannot invoke "String.split(String)" because "<local1>" is null`
|
99 | 158 |
|
100 |
| -Seed file is possibly empty. Please check if correct seed file is given. |
101 |
| - |
102 |
| -## Examples Args |
103 |
| - |
104 |
| -Please append the following with commands corresponed to your OS specify in `readme.md` |
105 |
| - |
106 |
| -```bash |
107 |
| -tests/example1.txt tests/result/example1 21 |
108 |
| -tests/example2.txt tests/result/example2 5 |
109 |
| -tests/example3.txt tests/result/example3 50 |
110 |
| -``` |
111 |
| - |
112 |
| -### Bad Examples |
113 |
| - |
114 |
| -```bash |
115 |
| -... tests/invalid1.txt tests/result/example1 1 |
116 |
| -Err: [seedFile] Invalid row/col, must be positive integer larger than 2 |
117 |
| -... tests/invalid2.txt tests/result/example1 1 |
118 |
| -Err: [seedFile] Invalid row/col, must be positive integer larger than 2 |
119 |
| -... tests/invalid3.txt tests/result/example1 1 |
120 |
| -Err: [seedFile] Unexpected cell type 2 |
121 |
| -... tests/invalid4.txt tests/result/example1 1 |
122 |
| -Err: [seedFile] Unexpected col length at row index 1 |
123 |
| -... tests/invalid5.txt tests/result/example1 1 |
124 |
| -Cannot invoke "String.split(String)" because "<local1>" is null |
125 |
| -... tests/example3.txt tests/result/example1 -1 |
126 |
| -Err: [input] step -1 is invalid |
127 |
| -``` |
| 159 | +Seed file is possibly empty. Please check if correct seed file is given. |
0 commit comments