paitin_hangman 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 95876b5a8cba2dd48a5ea4e54b5000aca7af882b
4
+ data.tar.gz: d435511921c6cca4559c882937eef2a094666609
5
+ SHA512:
6
+ metadata.gz: 687afc6b639117acf987a6fa0cc32579acbb282b7fa8cbd796dbfb0a5cc1bc5c8930dc74f2113ea1de783832c6a144c9343efe10e61c41762ffa4b295f154449
7
+ data.tar.gz: ca6039c84ebceb7ba195d3454ebab621add630aaaef88bdafff37f54d5044781d4471523e042e7a1582953bd90454a2916937c7dd99d7a17d205c7ee5289b749
data/.DS_Store ADDED
Binary file
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.3.0
4
+ before_install: gem install bundler -v 1.11.2
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in paitin_hangman.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Mayowa Pitan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # PaitinHangman
2
+ [![Code Climate](https://codeclimate.com/github/andela-mpitan/paitin_hangman/badges/gpa.svg)](https://codeclimate.com/github/andela-mpitan/paitin_hangman) [![Test Coverage](https://codeclimate.com/github/andela-mpitan/paitin_hangman/badges/coverage.svg)](https://codeclimate.com/github/andela-mpitan/paitin_hangman/coverage)
3
+
4
+ Welcome to my new gem! It is just a classic implentation of the Hangman game.
5
+
6
+ To play this game, just follow the smple instructions below
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ ```ruby
13
+ gem 'paitin_hangman'
14
+ ```
15
+
16
+ And then execute:
17
+
18
+ $ bundle
19
+
20
+ Or install it yourself as:
21
+
22
+ $ gem install paitin_hangman
23
+
24
+ ## Usage
25
+
26
+ This game is a REPL game, i.e it is being played from and with the **Terminal**. To start it just run `paitin_hangman`. Ensure you download the dictionary file from [here](https://drive.google.com/a/andela.co/file/d/0B1C3woZnW_mZQjZpUWlpNEZlTk0/view?usp=sharing) and run the game from the folder the dictionary file is. You can run it from anywhere else but it has not been tested if it will work yet.
27
+
28
+ Once started, the game is very intuitive and easy to follow.
29
+
30
+ ## Important note
31
+ In player mode, if the player is typing his word, it will not display on the screen, it will be hidden so as not to give the challenged player undue advantage.
32
+
33
+ *"Welcome to Hangman, the no-nonsense game
34
+ Be smart, then you live. if not, you'll have to die by Hanging.
35
+ You have a couple of options to pick from.....
36
+ Press 'P' or 'play' if you think you are ready for the challenge,
37
+ You may press 'I' or 'instructions' for a short explanation of how to play
38
+ You may continue a previously saved game by pressing 'L' or 'load'
39
+ Or you could just quit by pressing a 'Q' or typing 'quit'"
40
+ "The word to guess is represented by a row of dashes
41
+ These dashes represent each letter of the word.
42
+ Words you cannot use include proper nouns such as names, places, and brands.
43
+ If the guessing player suggests a letter which occurs in the word,
44
+ the other player writes it in all its correct positions."*
45
+ ## Extras
46
+ There is a cheat, you should find that by yourself
47
+
48
+ ## Development
49
+
50
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
51
+
52
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
53
+
54
+ ## Contributing
55
+
56
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/paitin_hangman.
57
+
58
+
59
+ ## License
60
+
61
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
62
+
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/games.yml ADDED
@@ -0,0 +1,17 @@
1
+ --- !ruby/object:PaitinHangman::GameData
2
+ player_name: MJ
3
+ misses: []
4
+ right_guesses: []
5
+ chances: 12
6
+ word_control: ___________
7
+ game_word: superscribe
8
+ count: 0
9
+ --- !ruby/object:PaitinHangman::GameData
10
+ player_name: MJ
11
+ misses: []
12
+ right_guesses:
13
+ - e
14
+ chances: 14
15
+ word_control: _e____________
16
+ game_word: regularization
17
+ count: 1
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "paitin_hangman"
5
+ PaitinHangman::Paitin.new.game_control
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here