truth_or_dare 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/truth_or_dare +3 -0
- data/lib/truth_or_dare.rb +103 -0
- metadata +47 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6bdb5734a93f32440066c1dc63a1a05e9cb90343
|
4
|
+
data.tar.gz: 6d1e7bc2402eed9e752638618e80c9254e3ef821
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 810355e56fa8c4ca7fc77175d5db075a4de32dfae3dbe13cabf517ac20f0817c8e4cd4c9905eda43539d57f88322e18769add852530e5b069abb814d477ab67d
|
7
|
+
data.tar.gz: 8536c3335e4d495e2a50ef579a16995979c9a5737be44847bbe618fea53a1c01080120af213f602aae37a1cbb46348d50af3050c1b5d51de5420fcd33418a367
|
data/bin/truth_or_dare
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
class TruthOrDare
|
2
|
+
|
3
|
+
TRUTHS = [
|
4
|
+
'Have you ever fallen in love?',
|
5
|
+
'When was the last time you were happy?',
|
6
|
+
'Have you ever been naked in public?',
|
7
|
+
'What is your biggest fear in a relationship?',
|
8
|
+
'What was your funniest first date ever?',
|
9
|
+
'What is your weirdest habit?',
|
10
|
+
'How many kids would you like to have?',
|
11
|
+
'What is one embarrassing fact I should know about you?',
|
12
|
+
'What was your childhood nickname?',
|
13
|
+
'What is your favourite food?',
|
14
|
+
'Would you ever consider being a nudist?',
|
15
|
+
'What is your guilty pleasure?',
|
16
|
+
'What is the most exotic food that you have ever eaten?',
|
17
|
+
'What do you daydream about the most?',
|
18
|
+
'Is the dress Black and Blue or Gold and White?'
|
19
|
+
]
|
20
|
+
|
21
|
+
DARES = [
|
22
|
+
'Fall in love',
|
23
|
+
'Be Happy',
|
24
|
+
'Be naked in public',
|
25
|
+
'Call your mom',
|
26
|
+
'Remove one shoe',
|
27
|
+
'Tie the shoelaces together of the person next to you',
|
28
|
+
'Scream MOIST as loud as you can',
|
29
|
+
'Close your eyes and send a blind text to a random person',
|
30
|
+
'Do an impression of your favorite celebrity',
|
31
|
+
'Go grab a broom and do your best tango',
|
32
|
+
'Give a 3 minute stand-up comedy routine',
|
33
|
+
'Break dance...READY..SET..GO',
|
34
|
+
'Make up a story about the item to your right',
|
35
|
+
'Sing the alphabet without moving your mouth',
|
36
|
+
'Do your best president impression',
|
37
|
+
'Yell out the first word that comes to your mind right now',
|
38
|
+
'Call the pizza place and order 10 sardine pizzas',
|
39
|
+
'Pound on your chest and act like a gorilla for the next minute',
|
40
|
+
'Sing everything you say for the next 10 minutes',
|
41
|
+
'Go to the neighbour’s house and ask for a banana',
|
42
|
+
'Go up to someone random and ask for a hug',
|
43
|
+
'Set your cell phone language to Chinese for the next 10 minutes',
|
44
|
+
'Sing “Twinkle Twinkle, Little Star” while beat boxing',
|
45
|
+
'Give a concert with your air guitar',
|
46
|
+
]
|
47
|
+
|
48
|
+
ANSWERS = [
|
49
|
+
'Scandalous!',
|
50
|
+
'Oh no you did NOT!',
|
51
|
+
'Oh em gee',
|
52
|
+
'ERMAHGERD',
|
53
|
+
'NO FREAKIN WAY',
|
54
|
+
"Don't worry, I'll never tell",
|
55
|
+
"Your secret is safe with me",
|
56
|
+
"I cannot believe you wrote that!",
|
57
|
+
"I'm going to tell your mom you said that!"
|
58
|
+
]
|
59
|
+
|
60
|
+
def play
|
61
|
+
print_welcome
|
62
|
+
get_user_choice
|
63
|
+
if valid_user_input?
|
64
|
+
get_challenge
|
65
|
+
else
|
66
|
+
print_bad_input_message
|
67
|
+
play
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
private
|
72
|
+
attr_reader :initial_choice
|
73
|
+
|
74
|
+
def print_welcome
|
75
|
+
print "Pick Truth or Dare (t/d): "
|
76
|
+
end
|
77
|
+
|
78
|
+
def print_bad_input_message
|
79
|
+
print "Sorry, #{initial_choice} is not a valid choice. "
|
80
|
+
end
|
81
|
+
|
82
|
+
def get_user_choice
|
83
|
+
@initial_choice = gets.chomp.downcase.strip
|
84
|
+
end
|
85
|
+
|
86
|
+
def valid_user_input?
|
87
|
+
initial_choice == 't' ||
|
88
|
+
initial_choice == 'd'
|
89
|
+
end
|
90
|
+
|
91
|
+
def get_challenge
|
92
|
+
case initial_choice
|
93
|
+
when 't'
|
94
|
+
puts TRUTHS.sample
|
95
|
+
truth = gets.chomp
|
96
|
+
puts ANSWERS.sample
|
97
|
+
when 'd'
|
98
|
+
puts DARES.sample
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
TruthOrDare.new.play
|
metadata
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: truth_or_dare
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Julie Graceffa
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-09-06 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Allows user to play truth or dare game and pick their option
|
14
|
+
email:
|
15
|
+
- julie.graceffa@gmail.com
|
16
|
+
executables:
|
17
|
+
- truth_or_dare
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- bin/truth_or_dare
|
22
|
+
- lib/truth_or_dare.rb
|
23
|
+
homepage:
|
24
|
+
licenses:
|
25
|
+
- MIT
|
26
|
+
metadata: {}
|
27
|
+
post_install_message:
|
28
|
+
rdoc_options: []
|
29
|
+
require_paths:
|
30
|
+
- lib
|
31
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
requirements: []
|
42
|
+
rubyforge_project:
|
43
|
+
rubygems_version: 2.6.6
|
44
|
+
signing_key:
|
45
|
+
specification_version: 4
|
46
|
+
summary: Truth or dare game
|
47
|
+
test_files: []
|