paitin_hangman 1.0.0 → 1.1.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/.DS_Store +0 -0
- data/.travis.yml +4 -0
- data/lib/paitin_hangman/.DS_Store +0 -0
- data/lib/paitin_hangman/game_resumption.rb +2 -1
- data/lib/paitin_hangman/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ce28a90ee0eb3c31043221bc62656da75037fae7
|
|
4
|
+
data.tar.gz: 995b6ae45993c8d01fd3a76333920aac2904c7dc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f452d7f5839861ab09a6442403f5449254d9bdc0be29fd3593924a4f0cbef94e68bbea2c01f8b28d9bb4c355dcdf715c1913c3a76c3d5b6cf5c8f6964d838bc3
|
|
7
|
+
data.tar.gz: 9c8cfc4e7fb3c7fc939e5bad081ba4cd83999f97ef72e7eebe74efdd7a5a4d4f2ff8ca11c693a91e151ebebd73b8562539eb4d8f87a5895c1938ac601fa1f604
|
data/.DS_Store
ADDED
|
Binary file
|
data/.travis.yml
ADDED
|
Binary file
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
require_relative "game_engine"
|
|
2
2
|
module PaitinHangman
|
|
3
3
|
class GameResumption < GameEngine
|
|
4
|
+
attr_reader :all_games
|
|
4
5
|
def initialize
|
|
5
6
|
file_name = File.join(File.dirname(File.expand_path(__FILE__)), '../../games.yml')
|
|
6
7
|
@all_games = YAML.load_stream(File.open(file_name, "a+"))
|
|
7
8
|
puts "Enter the name you used to store the game"
|
|
8
9
|
name = STDIN.gets.chomp.upcase
|
|
9
|
-
@saved_game =
|
|
10
|
+
@saved_game = all_games.select do |game|
|
|
10
11
|
game.player_name == name
|
|
11
12
|
end
|
|
12
13
|
initialize_cont(name)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: paitin_hangman
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mayowa Pitan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-03-
|
|
11
|
+
date: 2016-03-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -116,8 +116,10 @@ executables:
|
|
|
116
116
|
extensions: []
|
|
117
117
|
extra_rdoc_files: []
|
|
118
118
|
files:
|
|
119
|
+
- ".DS_Store"
|
|
119
120
|
- ".gitignore"
|
|
120
121
|
- ".rspec"
|
|
122
|
+
- ".travis.yml"
|
|
121
123
|
- Gemfile
|
|
122
124
|
- LICENSE.txt
|
|
123
125
|
- README.md
|
|
@@ -132,6 +134,7 @@ files:
|
|
|
132
134
|
- lib/.idea/modules.xml
|
|
133
135
|
- lib/.idea/workspace.xml
|
|
134
136
|
- lib/paitin_hangman.rb
|
|
137
|
+
- lib/paitin_hangman/.DS_Store
|
|
135
138
|
- lib/paitin_hangman/computer.rb
|
|
136
139
|
- lib/paitin_hangman/game_data.rb
|
|
137
140
|
- lib/paitin_hangman/game_engine.rb
|