You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 19, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: ConWaysGame/manuals/manual.md
+28-23Lines changed: 28 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,27 @@
1
-
# Manual
1
+
# Manual
2
2
3
-
This is the manual of Conway Game of Life simulator usage.
3
+
This is the user manual of Conway Game of Life simulator.
4
+
You may find detail program usage and error message explanation here.
4
5
5
-
## Inputs
6
+
## Inputs
6
7
7
8
In this section, program usage will be presented, as well as input file format.
8
9
9
-
### Command line
10
+
### Command line
10
11
11
-
Please refer to `readme.md`, looking for commands for your OS. Here we will explain each argument and its usage.
12
+
Please refer to `readme.md`, looking for commands for your OS. Here each argument will be explained in details.
12
13
13
14
#### `<input>`
14
15
15
16
The path to the seed file. The file format is defined below.
16
17
17
-
##### Input File format
18
+
##### Input File format
18
19
19
20
- The first line contains, in order, the number of rows, and the number of columns in the grid, separated by a comma and a space. E.g., 5, 7 means that there are 5 rows and 7 columns in the grid. There are no spaces after the number of columns.
20
21
- All lines starting from the second one contain the state of one row in the grid, starting with row #0. The state of each cell is designated with either 0 (cell is dead) or 1 (cell is alive). The states of individual cells are separated by a comma followed by a space (there is no comma and/or space after the last 0 or 1 in the line). For example, if the third line of the file (the second line of the grid part of the file) is 0, 0, 0, 1, 0, 0, 0 it corresponds to the following cell states in row[1]: row[1][0], row[1][1], row[1][2], row[1][4], row[1][5], and row[1][6] are dead, and row[1][3] is alive.
21
22
- All lines end with the new line character.
22
23
23
-
###### Example
24
+
###### Example
24
25
25
26
```
26
27
5, 7
@@ -41,70 +42,74 @@ The path to the directory where results should be stored. If the directory does
41
42
<seedFilename>.<currentStep>.txt
42
43
```
43
44
44
-
##### Output File Format
45
+
The `currentStep` will be started from `0`, the origin seed file, and will end in given `<step>` parameter.
46
+
47
+
##### Output File Format
48
+
45
49
46
50
The output file example may be found at `tests/result/`. The format of the file is the same as the input file.
47
51
48
-
#### `<step>`
52
+
53
+
#### `<step>`
49
54
50
55
The number of step the simulation should run. This should be a positive integer.
51
56
52
-
## Errors
57
+
## Errors
53
58
54
59
Here we have listed some possible errors when using the program and what could you do when you have encountered them.
55
60
We have also provided some good and bad examples in next section.
56
61
57
-
### `Err: [io] Output path must be a directory`
62
+
### `Err: [io] Output path must be a directory`
58
63
59
64
The specified `<output>` exists and is not a directory. Please specify another available location.
60
65
61
-
### `Err: [io] Failed to create output directory`
66
+
### `Err: [io] Failed to create output directory`
62
67
63
68
The specified `<output>` does not exist, but program failed to create corresponded parents directories. Sometimes it may be system error, but please ensure the path enter is valid for your current OS.
64
69
65
-
### `Err: [input] step x is invalid`
70
+
### `Err: [input] step x is invalid`
66
71
67
72
This happened when step is less than 0. Please specify a number equal to or larger than 0.
68
73
69
-
### `An error occur while processing files: `
74
+
### `An error occur while processing files: `
70
75
71
76
An `IOException` occurs. Possibly due to non-existence of a specified file, or other system issue. Please read stack for more info.
72
77
73
-
### `Err: [input] unable to parse "x" as integer`
78
+
### `Err: [input] unable to parse "x" as integer`
74
79
75
80
Either seed file row/col or step is not a valid integer representation. Please double check your input.
76
81
77
-
### `Err: [seedFile] unable to identify row/col of the map`
82
+
### `Err: [seedFile] unable to identify row/col of the map`
78
83
79
84
The first line of the seed file doesn't follow the `row, col` format and can't be parsed.
80
85
81
-
### `Err: [seedFile] Invalid row/col, must be positive integer larger than 2`
86
+
### `Err: [seedFile] Invalid row/col, must be positive integer larger than 2`
82
87
83
88
Row or column integer representation in the seedFile is invalid.
84
89
85
-
### `Err: [seedFile] Unexpected col length at row index x`
90
+
### `Err: [seedFile] Unexpected col length at row index x`
86
91
87
92
When reading seed file, a row is missing some cell representation. Please check if your file is corrupted.
88
93
89
-
### `Err: [seedFile] Unexpected cell type x`
94
+
### `Err: [seedFile] Unexpected cell type x`
90
95
91
96
When reading a specific cell in the seed file, program cannot recognize its status. Please refer to file format section for the correct types.
92
97
93
-
### `Cannot invoke "String.split(String)" because "<local1>" is null`
98
+
### `Cannot invoke "String.split(String)" because "<local1>" is null`
94
99
95
100
Seed file is possibly empty. Please check if correct seed file is given.
96
101
97
-
## Examples Args
102
+
## Examples Args
98
103
99
-
Please append the following with your OS command specify in `readme.md`
104
+
Please append the following with commands corresponed to your OS specify in `readme.md`
Copy file name to clipboardExpand all lines: ConWaysGame/manuals/tests.md
+4-8Lines changed: 4 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
3
3
The following methods are used when testing the program.
4
4
5
-
## United test
5
+
## Unit Test
6
6
7
-
A Java framework, JUnit5, has been used within the process. You may consult to `com.luox6.conway.test` for the test cases written.
7
+
A Java framework, JUnit5, has been used within the process. You may consult to `com.luox6.conway.test` for the written test cases.
8
8
9
-
### Included sections
9
+
### Included Sections
10
10
11
11
- getters/setters
12
12
- class constructor
@@ -22,13 +22,9 @@ You may use your favourite IDE integration with JUnit. Please consult [JUnit man
22
22
However, if you would like to use `ConsoleLauncher`, after compiling the program following the instruction in `readme.md`, try the following command for unit test result.
23
23
24
24
```bash
25
-
# The following bash command should run at project root directory
25
+
$ # The following bash command should run at project root directory
0 commit comments