Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

Commit 455a0cc

Browse files
committed
update manual
1 parent e94636e commit 455a0cc

16 files changed

+85
-51
lines changed
-3.1 MB
Binary file not shown.

ConwayGameOfLife/compile-pdf.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pandoc header-includes.yaml manual.md -o manual.pdf --pdf-engine=lualatex
2+
pandoc header-includes.yaml tests.md -o tests.pdf --pdf-engine=lualatex

ConwayGameOfLife/manuals/manual.md

Lines changed: 60 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,65 @@
33
This is the user manual of Conway Game of Life simulator.
44
You may find detail program usage and error message explanation here.
55

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+
![](./screenshot.png)
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+
665
## Inputs
766

867
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
97156

98157
### `Cannot invoke "String.split(String)" because "<local1>" is null`
99158

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.

ConwayGameOfLife/manuals/manual.pdf

149 KB
Binary file not shown.
146 KB
Loading

ConwayGameOfLife/manuals/tests.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,6 @@ Commands to run these examples have also listed in the manual. It is believed th
7777

7878
Game rules are also tested at `example2.txt` and `example3.txt` by stepping through the generated files.
7979

80-
Some examples inspired by [wikipedia](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life).
80+
You may find the expected output in `tests/result` section. Use `diff` for the file generated from the program with corresponded command -- these should be identical or it means something goes wrong.
81+
82+
Some examples inspired by [Wikipedia](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life).

ConwayGameOfLife/manuals/tests.pdf

404 Bytes
Binary file not shown.

ConwayGameOfLife/readme.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,14 @@ Open the powershell and nevigate to the project root directory
100100

101101
Program usages, and test explanations
102102

103+
#### `compile-pdf.sh`
104+
105+
Compile `.md` file into `pdf`. `pandoc` used
106+
103107
### `tests/`
104108

105109
Where examples/tests files stored. Read `manual.pdf` and `tests.pdf` for more info
106110

107111
### `deps/`
108112

109-
Dependencies(jars) such as JUnit for consistent environment
110-
111-
### `compile-pdf.sh`
112-
113-
Compile `.md` file into `pdf`. `pandoc` used
113+
Dependencies(jars) such as JUnit for consistent environment

0 commit comments

Comments
 (0)