tarzan 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/README.md +5 -3
- data/bin/tarzan +10 -0
- data/lib/tarzan/version.rb +1 -1
- data/lib/tarzan.rb +21 -4
- data/tarzan.gemspec +6 -6
- metadata +18 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d1f8f241b3d98808dd495d75bc8ccfcb8967e39
|
4
|
+
data.tar.gz: 6f297af38489451bb3876e22b888bcfb84edf0eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c63d52815b50dbf9ad537a39fa5ed99f50bfbf3c85037c2d115977b7778943b342c7eb387b8dcab616fcad1a31baf0b766054387de52ee2c9a71273f643b13f3
|
7
|
+
data.tar.gz: 28bcfd412957d457c90a81275d1a5ee124303a2d0fffd7b5a5a67e6ac57298798c54928b7cad81e0cb2a125bdf431ce7496abbe765ac5d85c6c315cf56b74b2a
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Tarzan
|
2
2
|
|
3
|
-
|
3
|
+
King of the Game Jungle
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -18,11 +18,13 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
From the command line run:
|
22
|
+
|
23
|
+
$ tarzan
|
22
24
|
|
23
25
|
## Contributing
|
24
26
|
|
25
|
-
1. Fork it
|
27
|
+
1. Fork it ( http://github.com/claudiob/tarzan/fork )
|
26
28
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
29
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
30
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/bin/tarzan
ADDED
data/lib/tarzan/version.rb
CHANGED
data/lib/tarzan.rb
CHANGED
@@ -1,5 +1,22 @@
|
|
1
|
-
require "tarzan/version"
|
2
|
-
|
3
1
|
module Tarzan
|
4
|
-
|
5
|
-
|
2
|
+
def self.play!
|
3
|
+
puts %{Welcome to the Game Hall}
|
4
|
+
|
5
|
+
puts %{Let’s play Rock Paper Scissors}
|
6
|
+
|
7
|
+
puts %{Pick [R]ock, [P]aper, or [S]cissors: }
|
8
|
+
|
9
|
+
move_p1 = gets.strip
|
10
|
+
move_p2 = ['R', 'P', 'S'].sample
|
11
|
+
|
12
|
+
puts %{You played #{move_p1} - I played #{move_p2}}
|
13
|
+
|
14
|
+
case "#{move_p1}#{move_p2}"
|
15
|
+
when 'RS', 'SP', 'PR' then puts %{You win!}
|
16
|
+
when 'RP', 'SR', 'PS' then puts %{You lose!}
|
17
|
+
when 'RR', 'SS', 'PP' then puts %{It’s a tie!}
|
18
|
+
end
|
19
|
+
|
20
|
+
puts %{Goodbye, and come back to the Game Hall}
|
21
|
+
end
|
22
|
+
end
|
data/tarzan.gemspec
CHANGED
@@ -8,16 +8,16 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Tarzan::VERSION
|
9
9
|
spec.authors = ["claudiob"]
|
10
10
|
spec.email = ["claudiob@gmail.com"]
|
11
|
-
spec.
|
12
|
-
spec.
|
13
|
-
spec.homepage = ""
|
11
|
+
spec.summary = %q{King of the Game Jungle.}
|
12
|
+
spec.description = %q{Step-by-step tutorial to modular games in Ruby}
|
13
|
+
spec.homepage = "https://github.com/claudiob/tarzan"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
|
-
spec.files = `git ls-files`.split(
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_development_dependency "bundler", "~> 1.
|
22
|
-
spec.add_development_dependency "rake"
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.5"
|
22
|
+
spec.add_development_dependency "rake", "~> 0"
|
23
23
|
end
|
metadata
CHANGED
@@ -1,59 +1,61 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tarzan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- claudiob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.5'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
description:
|
41
|
+
description: Step-by-step tutorial to modular games in Ruby
|
42
42
|
email:
|
43
43
|
- claudiob@gmail.com
|
44
|
-
executables:
|
44
|
+
executables:
|
45
|
+
- tarzan
|
45
46
|
extensions: []
|
46
47
|
extra_rdoc_files: []
|
47
48
|
files:
|
48
|
-
- .gitignore
|
49
|
+
- ".gitignore"
|
49
50
|
- Gemfile
|
50
51
|
- LICENSE.txt
|
51
52
|
- README.md
|
52
53
|
- Rakefile
|
54
|
+
- bin/tarzan
|
53
55
|
- lib/tarzan.rb
|
54
56
|
- lib/tarzan/version.rb
|
55
57
|
- tarzan.gemspec
|
56
|
-
homepage:
|
58
|
+
homepage: https://github.com/claudiob/tarzan
|
57
59
|
licenses:
|
58
60
|
- MIT
|
59
61
|
metadata: {}
|
@@ -63,18 +65,18 @@ require_paths:
|
|
63
65
|
- lib
|
64
66
|
required_ruby_version: !ruby/object:Gem::Requirement
|
65
67
|
requirements:
|
66
|
-
- -
|
68
|
+
- - ">="
|
67
69
|
- !ruby/object:Gem::Version
|
68
70
|
version: '0'
|
69
71
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
72
|
requirements:
|
71
|
-
- -
|
73
|
+
- - ">="
|
72
74
|
- !ruby/object:Gem::Version
|
73
75
|
version: '0'
|
74
76
|
requirements: []
|
75
77
|
rubyforge_project:
|
76
|
-
rubygems_version: 2.
|
78
|
+
rubygems_version: 2.2.0
|
77
79
|
signing_key:
|
78
80
|
specification_version: 4
|
79
|
-
summary:
|
81
|
+
summary: King of the Game Jungle.
|
80
82
|
test_files: []
|