mastermind-nowsiany 1.0.1 → 1.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9400a715df13c713caccacbcdb6906a0794d5263
4
- data.tar.gz: b4122a3591eac317e9e8da2bd87b9b1eb3f1aace
3
+ metadata.gz: bf410ef9127e628bb4d035ba3122d50dc15c05cc
4
+ data.tar.gz: 8a75801e1b0da4d76a47778530946f81145d2a47
5
5
  SHA512:
6
- metadata.gz: c6c852630a9cb18817b2854f685022b7e8fb985ff79ec547b1f23152fe57a73203ecd6d90aa1c1e8a7f759ff537005d39350c84d1b65c9105e2925ed6827f992
7
- data.tar.gz: 43e52dc463b83fe3fc4464b877a94598c0ce5530da59d80758c9f16ff48af2d5577a9b565cd0a5d34682d533480fc6d6728bdef4f1509222d84edb10a4fa90dc
6
+ metadata.gz: 74352089cefe463b797308e0bb3adc6694d5204205e380aee2e4c2ca339f9857f49452e38da6e13a97768dd309bbbf97ae494977c8c246b0cd029d6b2b32fab6
7
+ data.tar.gz: e5165cf3d0300d0792a9d75c048b3c1247aced495c59a4143270ec2022b2fab9f2d5e68c8ede6b0ad4fadc930e3718878aceb477683d816c456f493caad5f59e
data/README.md CHANGED
@@ -8,7 +8,7 @@ There are both single and multi-player modes. In multi-player mode players creat
8
8
 
9
9
  To install run:
10
10
 
11
- $ gem install mastermind
11
+ $ gem install mastermind-nowsiany
12
12
 
13
13
  ## Usage
14
14
 
@@ -30,7 +30,7 @@ module Mastermind
30
30
  def process_command
31
31
  case
32
32
  when quit? then outstream.puts interact.print_farewell
33
- when instructions? then outstream.puts interact.print_instructions
33
+ when instructions? then outstream.puts interact.print_instructions(Mastermind.color_option_string(6))
34
34
  when play? then Mastermind::PlayGame.new(instream, outstream, interact).run
35
35
  else outstream.puts interact.print_invalid(command)
36
36
  end
@@ -28,12 +28,12 @@ _/ _/ _/_/_/ _/_/_/ _/_/ _/_/_/ _/ _/ _/ _/ _/
28
28
  blank_line +
29
29
  "
30
30
  ====================================
31
- | M4573RM1ND MA1N M3NV |
31
+ | MASTERMIND MAIN MENU |
32
32
  | ---------------------------------- |
33
33
  | |
34
- | (i)NStRUCti0nZ |
35
- | (p)1aY the g4M3 |
36
- | (q)V1t |
34
+ | (i)nstructions |
35
+ | (p)lay |
36
+ | (q)uit |
37
37
  | |
38
38
  ====================================
39
39
  ".colorize(:green) +
@@ -46,12 +46,12 @@ _/ _/ _/_/_/ _/_/_/ _/_/ _/_/_/ _/ _/ _/ _/ _/
46
46
  blank_line +
47
47
  "
48
48
  ====================================
49
- | M4573RM1ND 9AM3 0PTZ |
49
+ | MASTERMIND GAME OPTS |
50
50
  |------------------------------------|
51
51
  | |
52
- | (s)1nG1e pl4y0r |
53
- | (m)u171 pl4y0r |
54
- | (q)V1t |
52
+ | (s)ingle player |
53
+ | (m)ulti player |
54
+ | (q)uit |
55
55
  | |
56
56
  ====================================
57
57
  ".colorize(:green) +
@@ -118,9 +118,25 @@ Thanks for playing
118
118
  "
119
119
  end
120
120
 
121
- def print_instructions
121
+ def print_instructions(colors)
122
122
  "
123
- These are the instructions.
123
+ Mastermind is a code breaking game for one or two players.\n\n"+
124
+ "##SINGLE PLAYER##".colorize(:green)+
125
+ "\nIn a single player game, when starting, the computer generates a secret code that you need to
126
+ guess. The code will consist of 4 colors out of a possible 6. The possible colors are:
127
+ #{colors}
128
+
129
+ The code that you will be guessing will be something like 'RRGB'. Note that duplicate colors
130
+ may be present in the code.
131
+
132
+ You will be given 12 guesses to guess the correct answer. If you guess correctly, you will see
133
+ the number of guesses it took you to guess the correct answer along with the amount of
134
+ time that it took you to guess correctly.\n\n"+
135
+ "##MULTI PLAYER##".colorize(:green)+
136
+ "\nIn a multi player game, the game play is the same as single player, but each player chooses
137
+ the code that their opponent must guess. After each player has chosen a secret code, players
138
+ will alternate guessing their code until either, each player finishes, or the players run out
139
+ of guesses.
124
140
  "
125
141
  end
126
142
 
@@ -1,3 +1,3 @@
1
1
  module Mastermind
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mastermind-nowsiany
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Owsiany