terminal_game_of_life 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +9 -8
- data/lib/game_of_life.rb +2 -2
- data/lib/game_of_life/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d04df815c4ced0c6ef47f54c2b76494049f2e7fb13a275c1a6516ac581c811f
|
4
|
+
data.tar.gz: 2eb5c323713c7a3f88be96401a1e504eace30863012f7e8d60b5bb7c67bca146
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65766a0deea4376ca35f86cf0ef371495b3d007cccd6e05c1747f787971861957e042c47d556886dea83040dee67d2213a16c1f7b5c489218ab0be8d41588b16
|
7
|
+
data.tar.gz: 3610828ea188523c505a02aeb84deabebd4372e47e2cb77fa07b9e1004714d76ca1411b55ef53e0473d7c7abb079eed109d58841a13adf9efaf1be432f738b5c
|
data/README.md
CHANGED
@@ -14,17 +14,18 @@ Run `$game-of-life -i https://gitlab.com/a14m --live-cell +`
|
|
14
14
|
Check `game-of-life --help` for usage info.
|
15
15
|
|
16
16
|
```
|
17
|
+
Commands:
|
17
18
|
game-of-life --version, -v # Prints the Game of Life version information
|
18
19
|
game-of-life help [COMMAND] # Describe available commands or one specific command
|
19
|
-
game-of-life start [OPTIONS] # Start the Game of Life simulations
|
20
|
+
game-of-life start [OPTIONS] # Start the Game of Life simulations
|
20
21
|
|
21
22
|
Options:
|
22
23
|
-s, [--seed=SEED] # Specify the seed number to use as an initial state (default to random).
|
23
24
|
-i, [--input=VALUE] # Specify the path/URL for the file to use as an initial state. (used instead of seed)
|
24
|
-
|
25
|
-
|
25
|
+
[--width=WIDTH] # Specify the width of generated universe. (default to terminal width)
|
26
|
+
[--height=HEIGHT] # Specify the hight of generated universe. (default to terminal height)
|
26
27
|
[--dead-cell=CHAR] # Specify the dead-cell representation
|
27
|
-
# Default:
|
28
|
+
# Default:
|
28
29
|
[--live-cell=CHAR] # Specify the dead-cell representation
|
29
30
|
# Default: █
|
30
31
|
-d, [--delay=Milli-Seconds] # Specify the introduced delay between each generation
|
@@ -32,7 +33,7 @@ Options:
|
|
32
33
|
```
|
33
34
|
|
34
35
|
## Demo
|
35
|
-
[](https://asciinema.org/a/PsKzaWaNwUq3ZEfrFATqMw0yF)
|
36
37
|
|
37
38
|
## Development
|
38
39
|
|
@@ -61,6 +62,6 @@ The tag will automatically trigger the release workflow after successful build/t
|
|
61
62
|
and release the changes to [rubygems.org](https://rubygems.org/gems/terminal_game_of_life)
|
62
63
|
|
63
64
|
## Extra information
|
64
|
-
### [Contributing](
|
65
|
-
### [License](
|
66
|
-
### [Code of Conduct](
|
65
|
+
### [Contributing](https://gitlab.com/a14m/game-of-life/-/blob/master/CONTRIBUTING.md)
|
66
|
+
### [License](https://gitlab.com/a14m/game-of-life/-/blob/master/LICENSE.md)
|
67
|
+
### [Code of Conduct](https://gitlab.com/a14m/game-of-life/-/blob/master/CODE_OF_CONDUCT.md)
|
data/lib/game_of_life.rb
CHANGED
@@ -49,9 +49,9 @@ module GameOfLife
|
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
|
-
#
|
52
|
+
# render method to do the terminal screen/scrollback buffer cleaning
|
53
53
|
# and rendering of the current universe/banner info
|
54
|
-
# based on the delay configured by the user
|
54
|
+
# based on the delay/cell configured by the user
|
55
55
|
def render(universe)
|
56
56
|
puts "\33c\e[3J" # Clears the screen and scrollback buffer.
|
57
57
|
puts universe.to_s
|
data/lib/game_of_life/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terminal_game_of_life
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- a14m
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|