brainsnap 1.0.0 → 1.0.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
  SHA1:
3
- metadata.gz: 724d3d815cdcb4fab17335668a481b5a76b50aba
4
- data.tar.gz: 0c431d502bf7770c55697d95f4d0012997faabc3
3
+ metadata.gz: 8f2f6ffe976b9d382664a65536b57bd75b09843d
4
+ data.tar.gz: 6d0407a73b79f03c932d95085c5a271648d5d9cd
5
5
  SHA512:
6
- metadata.gz: 2743e64891a8ad256158a828da5f16343e3526ed98da998f51807623363c5f4518747d726e623ce7360800c37902cb12afdaf3d48b2a881da56b540be25efc48
7
- data.tar.gz: fc205a23422a03a07ff677c1874da2409082d8b00e42a5c7890533108c92fc3d0982adf4f6f1913b4db3410fb017f511e94132eef4de7e36befa70e8e80c9b08
6
+ metadata.gz: 313a34a58b551712ea78441e7f29ed5747499e00dadb12482624e3fd2873d991e98f3a430d282972cccb0d090b3619f386ccdf83576ce5c3559cc3bd00446626
7
+ data.tar.gz: 7c80b41de12a9701a1b33a36abef3835f8ba7e55aebd68b2bdac61b5d2811731a55aed3deacb65f0a9b949f945427dc08dc62d75c61b9c1873312cb14bc3a3e5
data/README.md CHANGED
@@ -1,13 +1,13 @@
1
- # Brainspan
1
+ # Brainsnap
2
2
 
3
- This is my first gem and a work in progress trivia game for your command line.
3
+ BrainSnap is a command line trivia game!
4
4
 
5
5
  ## Installation
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'brainspan'
10
+ gem 'brainsnap'
11
11
  ```
12
12
 
13
13
  And then execute:
@@ -16,7 +16,7 @@ And then execute:
16
16
 
17
17
  Or install it yourself as:
18
18
 
19
- $ gem install brainspan
19
+ $ gem install brainsnap
20
20
 
21
21
  ## Usage
22
22
 
data/lib/brainsnap.rb CHANGED
@@ -29,7 +29,9 @@ module BrainSnap
29
29
  View.enter_username
30
30
  input = View.user_input
31
31
  @user = input.capitalize
32
- if input.length > 0
32
+ if input == 'quit'
33
+ exit
34
+ elsif input.length > 0
33
35
  View.choose_category
34
36
  case View.user_input
35
37
  when '1'
@@ -42,6 +44,8 @@ module BrainSnap
42
44
  input = 'Sports'
43
45
  when '5'
44
46
  input = 'Ruby'
47
+ when 'quit'
48
+ exit
45
49
  else
46
50
  puts "Choosing random category..."
47
51
  sleep 1.5
@@ -1,3 +1,3 @@
1
1
  module Brainsnap
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
data/lib/view.rb CHANGED
@@ -77,6 +77,9 @@ class View
77
77
  end
78
78
 
79
79
  def self.show_scores(players)
80
+ percent = 0
81
+ (1..100).each{|x| sleep(0.01); print "Submitting your score...#{percent+=1}%\r"}
82
+ puts
80
83
  puts "High Scores:"
81
84
  players.each { |player| puts "#{player.user_name}: #{player.score}" }
82
85
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brainsnap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Shine