lifegame 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b03e7984892a3c5696b3434be5740e287da49a56a5c5cd3eee4ee4ac0e4d5b5
4
- data.tar.gz: bd978814bcbe053443318354b2ccbdb857c864a47e5a8a78dbf77908e0f41869
3
+ metadata.gz: e2e80d6b2927a69ed97a8e142a7538ce1ddd4011b22dd4d781a15952cc93f151
4
+ data.tar.gz: f61309c22f99c50799a74137f37ed49dd3f2bf38ea891c283a9acdff9a473d6c
5
5
  SHA512:
6
- metadata.gz: 5aedb4c9d304dddb46e9a6299d091e0f3ab0f5bdcc0935f36484af64ec45fa6ee41f18f838f5c8ba9f002063964634f5e2c9991334b5bed58c7d0c45052c8f1e
7
- data.tar.gz: 87eaff8d9a2b8e68f02f966b4d0cd98d038e32403772a27a15f79527220dfa7b83b3a8c7653f48e9b693524cf702969e2f911903d7db59972990675493b88974
6
+ metadata.gz: 546c342f21ee880a8272508e69781e0bb57705395ababddbcbe03ecb5bebe0f15d38b39265a287afd61f7a93b2c3c2925ca7f8202f53ccc96fe12fafdee66619
7
+ data.tar.gz: '05945e3ef8b12b9a4259121786eec24988e115445e6a5ed17b9b2817af6b4a6e94e30c4d5c0a1c7c211d177759807085888d1f516336ec25fabda0c627a4da38'
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lifegame (0.1.0)
4
+ lifegame (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,10 +1,53 @@
1
1
  # Lifegame
2
2
 
3
+ Ruby CLI implementation of [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life).
4
+
5
+ demo: `git clone` and `bundle install` and `bundle exec ./bin/demo`
6
+
3
7
  [![demo](./demo.gif)](./demo.gif)
4
8
 
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ ```ruby
14
+ gem 'lifegame'
15
+ ```
16
+ And then execute:
17
+
18
+ ```
19
+ $ bundle install
20
+ ```
21
+
22
+ Or install it yourself as:
23
+
24
+ ```
25
+ $ gem install lifegame
26
+ ```
27
+
5
28
  ## Usage
6
29
 
7
- `git clone` and `bundle install` and `bundle exec ./bin/demo`
30
+ ```ruby
31
+ # 20 x 50
32
+ game = Lifegame::Lifegame.new(20, 50)
33
+
34
+ # eg: grader
35
+ game[2,7].be!; game[2,8].be!; game[2,9].be!; game[1,7].be!; game[0,8].be!
36
+
37
+ # print
38
+ puts game
39
+
40
+ # next
41
+ game.next!
42
+ puts game
43
+
44
+ # autoplay
45
+ game.start
46
+
47
+ # random with alive frequency
48
+ game.sow!(0.2)
49
+ game.start
50
+ ```
8
51
 
9
52
  ## License
10
53
 
@@ -1,3 +1,3 @@
1
1
  module Lifegame
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["oieioi"]
9
9
  spec.email = ["atsuinatsu.samuifuyu@gmail.com"]
10
10
 
11
- spec.summary = 'life game'
12
- spec.description = 'play life game!'
11
+ spec.summary = "Conway's Game of Life"
12
+ spec.description = "Conway's Game of Life"
13
13
  spec.homepage = "https://github.com/oieioi/lifegame.rb"
14
14
  spec.license = "MIT"
15
15
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lifegame
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - oieioi
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
- description: play life game!
55
+ description: Conway's Game of Life
56
56
  email:
57
57
  - atsuinatsu.samuifuyu@gmail.com
58
58
  executables: []
@@ -99,5 +99,5 @@ requirements: []
99
99
  rubygems_version: 3.0.3
100
100
  signing_key:
101
101
  specification_version: 4
102
- summary: life game
102
+ summary: Conway's Game of Life
103
103
  test_files: []