brainsnap 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 111c4bfa76188eb8811a51b250fd80cda0d7a714
4
+ data.tar.gz: 03e9f90a665af8ad210386098d3b9acc5ffbc091
5
+ SHA512:
6
+ metadata.gz: 952346e18fcedc66bc526fb79d739cbbc6b37be3ba7e648bef0a4d398266f784a8413e3a0d9926c29d53a05bdd87711d3773acce7540d575dca576b76dd72a33
7
+ data.tar.gz: c7355050a1dc7c026bf2c6e5bf8e1d23fecd116c4885e29a526c98e5dc29786b47096cd3198c3c66ad759667c890451bec2e8046ee9097bf4e2b52d09294b83b
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in brainsnap.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Dylan Shine
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # Brainspan
2
+
3
+ This is my first gem and a work in progress trivia game for your command line.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'brainspan'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install brainspan
20
+
21
+ ## Usage
22
+
23
+ TODO: Write usage instructions here
24
+
25
+ ## Contributing
26
+
27
+ 1. Fork it ( https://github.com/[my-github-username]/brainspan/fork )
28
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
29
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
30
+ 4. Push to the branch (`git push origin my-new-feature`)
31
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
data/bin/brainsnap ADDED
@@ -0,0 +1,4 @@
1
+ require 'brainsnap'
2
+
3
+ game = BrainSpan::Game.new
4
+ game.play
data/brainsnap.gemspec ADDED
@@ -0,0 +1,16 @@
1
+ require File.expand_path('../lib/brainsnap/version', __FILE__)
2
+
3
+ Gem::Specification.new do |gem|
4
+ gem.authors = ["Dylan Shine"]
5
+ gem.email = ["dylanshinenyc@gmail.com"]
6
+ gem.description = %q{This is a simple trivia game for the command line.}
7
+ gem.summary = %q{}
8
+ gem.homepage = "https://github.com/dshine112/BrainSpan"
9
+
10
+ gem.files = `git ls-files`.split($\)
11
+ gem.executables = ["brainsnap"]
12
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
13
+ gem.name = "brainsnap"
14
+ gem.require_paths = ["lib"]
15
+ gem.version = Brainsnap::VERSION
16
+ end
@@ -0,0 +1,3 @@
1
+ module Brainsnap
2
+ VERSION = "0.0.4"
3
+ end
data/lib/brainsnap.rb ADDED
@@ -0,0 +1,123 @@
1
+ require "brainspan/version"
2
+ require_relative 'model'
3
+ require_relative 'view'
4
+ require_relative 'highscoreparse'
5
+
6
+
7
+ module BrainSnap
8
+ class Game
9
+ attr_reader :user, :score
10
+ attr_accessor :current_card, :dealer
11
+
12
+ def initialize
13
+ # something to generate new cards
14
+ @user = nil
15
+ @current_card = nil
16
+ @score = 0
17
+ @correctly_answered = []
18
+ @incorrectly_answered = []
19
+ end
20
+
21
+ def self.user
22
+ @user
23
+ end
24
+
25
+
26
+ def start_menu
27
+ View.clear
28
+
29
+ View.enter_username
30
+ input = View.user_input
31
+ @user = input.capitalize
32
+ if input.length > 0
33
+ View.choose_category
34
+ case View.user_input
35
+ when '1'
36
+ input = 'Animals'
37
+ when '2'
38
+ input = 'Food'
39
+ when '3'
40
+ input = 'Computers'
41
+ when '4'
42
+ input = 'Sports'
43
+ when '5'
44
+ input = 'Ruby'
45
+ else
46
+ puts "Choosing random category..."
47
+ sleep 1.5
48
+ input = ['Animals','Food','Computers','Sports','Ruby'].sample
49
+ end
50
+ @dealer = Dealer.new('game_questions.csv', input)
51
+ next_card
52
+ play_game
53
+ else
54
+ start_menu
55
+ end
56
+ end
57
+
58
+ def play_game
59
+ View.clear
60
+ # show current card's category and question
61
+ View.category_screen(current_card.category)
62
+ View.show_card(current_card.question)
63
+
64
+ # get user input from the View
65
+ # TODO: prompt user for answer in View
66
+ guess = View.user_input.downcase
67
+
68
+ if guess == 'quit'
69
+ end_game
70
+ else
71
+ # define flow of game based on user input (case statement)
72
+ # use View to print returns from Model
73
+ # define how the game ends
74
+ if dealer.check(@current_card.answer, guess) # is this bad design?
75
+ View.correct
76
+ mark_correct(@current_card)
77
+ @score+=1
78
+ sleep 1.5
79
+ else
80
+ View.incorrect(@current_card.answer)
81
+ mark_incorrect(@current_card)
82
+ if @incorrectly_answered.length >=3
83
+ end_game
84
+ end
85
+ sleep 1.5
86
+ end
87
+ if next_card
88
+ next_card
89
+ play_game
90
+ else
91
+ end_game
92
+ end
93
+ end
94
+ end
95
+
96
+ def next_card
97
+ @current_card = dealer.load_card
98
+ end
99
+
100
+ def end_game
101
+ View.show_results(@correctly_answered.length, @incorrectly_answered.length)
102
+ highscore = HighScores.new(@user, @score)
103
+ highscore.players
104
+ highscore.changeScore
105
+ View.show_scores(highscore.sort_players)
106
+ system 'ruby push.rb'
107
+ exit
108
+ end
109
+
110
+ def mark_correct(card_obj)
111
+ @correctly_answered << card_obj
112
+ end
113
+
114
+ def mark_incorrect(card_obj)
115
+ @incorrectly_answered << card_obj
116
+ end
117
+
118
+ def play
119
+ system 'ruby pull.rb'
120
+ self.start_menu
121
+ end
122
+ end
123
+ end
File without changes
@@ -0,0 +1,720 @@
1
+ category,question,answer
2
+ Animals,What kind of animal is the emblem of the US republican political party?,Elephant
3
+ Animals,What color is an ocelot?,Yellow with black markings
4
+ Animals,Which type of animals have more teeth reptiles or mammals?,Mammals
5
+ Animals,A cow normally has how many teats?,Four
6
+ Animals,What is the only venomous snake found in Britain?,Adder
7
+ Animals,What type of leaves does a Koala use for food?,Eucalyptus
8
+ Animals,What type of animal is the main source of food for a mole?,Earthworms
9
+ Animals,What is another name for a Guinea Pig?,Cavy
10
+ Animals,What kind of animals live in an apiary?,Bees
11
+ Animals,What was Tarzan's Chimpanzee's name?,Cheta
12
+ Animals,Celeste was the wife of which fictional animal?,Babar the Elephant
13
+ Animals,What were the names of the two bears that lived in Jellystone Park?,Yogi and Boo Boo
14
+ Animals,What is the name for a collection of frogs?,Army
15
+ Animals,What kind of animal was Gentle Ben on the TV show?,Bear
16
+ Animals,A female donkey is called a what?,Jenny
17
+ Animals,On a common lady bug what color are the spots?,Black
18
+ Animals,Which subhuman primate is the most intelligent?,Chimpanzee
19
+ Animals,A mandrill is what type of creature?,Monkey
20
+ Animals,The most Asian elephants to be found in their natural habitat can be found in what country?,India
21
+ Animals,Which animal is the fastest a hare greyhound or horse?,Hare
22
+ Animals,What type of animal is a Tasmanian Devil?,Marsupial
23
+ Animals,Which sense is the weakest sense in most primates?,Sense of Smell
24
+ Animals,Sika fallow and Roe are what types of animal?,Deer
25
+ Animals,Animals living in what type of habitat are arboreal animals?trees,In or amongst
26
+ Animals,What type of animal produces gossamer?,Spider
27
+ Animals,What kind of animal is the source of mohair?,Angora Goat
28
+ Animals,What land mammal other than man has the longest lifespan?,Elephant
29
+ Animals,Lupus is the Latin name for what animal?,Wolf
30
+ Animals,Who was the British TV personality that presented the show Animal Magic?,Johnny Morris
31
+ Animals,Michael Bond created what famous bear?,Paddington Bear
32
+ Animals,Walt Disney's famous deer was named what?,Bambi
33
+ Animals,A horse named Black Bess was ridden by who?,Dick Trupin
34
+ Animals,In the Lone Range what was Tonto's horse's name?,Scout
35
+ Animals,What kind of animals were Chi Chi and An An?,Panda bears
36
+ Animals,In the Jungle Book what kind of creature was Baloo?,A bear
37
+ Animals,How do bees communicate with each other?,Dancing
38
+ Animals,A stoat produces fur called what?,Ermine
39
+ Animals,What type of insect eats its mate after mating?,Preying Mantis
40
+ Animals,Coral and algae have what kind of relationship?,Symbiotic
41
+ Animals,What kind of animals don't hunt or eat any meat?,Herbivore
42
+ Animals,What is the name of the largest land animal?,Elephant
43
+ Animals,When caterpillar changes into an adult butterfly what is the change called?,Metamorphous
44
+ Animals,The study of animals is given the name of what?,Zoology
45
+ Animals,What type of mammals fly using echolocation?,Bats
46
+ Animals,How many types of panda are there?,Two
47
+ Animals,The longest beetle in the world is how long?,Six inches
48
+ Animals,Animals without backbones are called what?,Invertebrates
49
+ Animals,An earthworm has how many hearts?,5
50
+ Animals,A fluke is what kind of animal?,Worm
51
+ Animals,The spots on a plaice are what color?,Orange
52
+ Animals,An abalone is what kind of animal?,Marine snail
53
+ Animals,The study of birds eggs is called what?,Oology
54
+ Animals,What is the offspring of a mare and a male ass called?,A mule
55
+ Animals,On a rabbit where would you find a scut?,The tail
56
+ Animals,In Thailand what is the sacred animal?,The white elephant
57
+ Animals,Alphabetically what animal comes first in the Chinese horoscope?,Boar
58
+ Animals,Alphabetically what animal comes last in the Chinese horoscope?,Tiger
59
+ Animals,What type of animal is the symbol of medicine?,Snake
60
+ Animals,Which type of semi aquatic animal is a lutra-lutra?,An Otter
61
+ Animals,What animals make a sound called nuzzing?,Camels
62
+ Animals,What animal is the symbol of long life in Korea?,The Deer
63
+ Animals,A Curry Comb is used on what type of creature?,Horse
64
+ Animals,The llama belongs to what family to what family of animals?,Camel
65
+ Animals,Eskimos call what kind of creature a nanook?,Polar Bear
66
+ Animals,Which animal has the longest lifespan in captivity?,Giant Tortoise
67
+ Animals,In Peru what animal provides 50% of all the protein eatin?,The Guinea Pig
68
+ Animals,What animal pollinates banana plants in the wild?,Bats
69
+ Animals,A fennec is what type of animal?,A Desert Fox
70
+ Animals,What kind of creature always gives birth to same sex twins?,Armadillo
71
+ Animals,The Suidae family is made up of what animals?,Pigs
72
+ Animals,A markhor is what type of animal?,Wild goat
73
+ Animals,What type of insect has the best eyesight?,Dragonfly
74
+ Animals,What form was the Egyptian god Sobek?,Crocodile
75
+ Animals,A cow's stomach has how many chambers?,4
76
+ Animals,How many humps does an African camel have?,One
77
+ Animals,Who are the queen bee's closest servants in a beehive?,Drones
78
+ Animals,What is the animal with the Latin name syncerus caffer?,Cape Buffalo
79
+ Animals,A Quagga is an extinct animal that was a distant cousin to which animal that exists today?,Zebra
80
+ Animals,What does a carpophagus animal feed on?,Fruit
81
+ Animals,Which animal has rectangular pupils?, Goat
82
+ Animals,What kind of animal mates only once for 12 hours and can sleep for three years?,Snail
83
+ Animals,Do mosquitoes have teeth?,yes
84
+ Animals,A typical mayfly lives for how many days?,One
85
+ Animals,What is a fox's den called?,Earth
86
+ Animals,What is the only mammal that can't jump?,Elephant
87
+ Animals,What bird can swim but can't fly?,Penguin
88
+ Animals,Which Fred is the Daily Mail's cartoon dog?,Fred Bassett
89
+ Animals,In Winnie the Pooh what kind of animal is Eeyore?,Donkey
90
+ Animals,What type of creature is a Basilisk?,Lizard
91
+ Animals,What type of animal according to Beatrix Potter was Mr Jeremy Fisher?,Frog
92
+ Animals,Which animal appears first in the dictionary?,Aardvark
93
+ Animals,What is the name given to the young of a Kangaroo?,Joey
94
+ Animals,What creature was Will Smith's codename in the movie Independence day?,Eagle
95
+ Animals,What is a Natterjack?,Toad
96
+ Animals,What is the smallest bird in the world?,Hummingbird
97
+ Animals,Which animals does Lupine relate to?,Wolves
98
+ Animals,Which extinct creature got its name from the portuguese for stupid?,Dodo
99
+ Animals,Daddy Long Legs is the common name for which fly?,Crane Fly
100
+ Animals,A Harlequin is what type of bird?,Duck
101
+ Animals,In the 19th Century what creatures were frequently used to bleed patients?,Leeches
102
+ Animals,What type of creature is a sidewinder?,Snake
103
+ Animals,To signal the end of the flood which bird brought back a twig to Noah?,Dove
104
+ Animals,Which animal is used on the Toys R Us logo?,Giraffe
105
+ Animals,What is the deadliest spider?,The Black Widow Spider
106
+ Animals,How many times can a bee sting?,Once
107
+ Animals,Which bug has the most legs?,Millipede
108
+ Animals,Can iguanas blink?,No
109
+ Animals,Which penguin dad likes to babysit?,Emporer Penguin
110
+ Animals,What are baby elephants called?,Calves
111
+ Animals,The staple diet of a Koala bear is what?,Eucalyptus Leaves
112
+ Animals,The World Wildlife Fund has which animal as it's symbol?,Giant Panda
113
+ Animals,The cabbage moth is which colour?,Brown
114
+ Animals,I will fend off anyone bad I am mans best friend?,Dog
115
+ Animals,My babies weigh less than apples I eat bamboo?,Panda bear
116
+ Animals,Cashmere is sourced from which animal?,Goat
117
+ Animals,A cow sweats from which part of its body?,Nose
118
+ Animals,What is a large clawed marine crustacean?,Lobster
119
+ Animals,What type of creature's a bustard?,Bird
120
+ Animals,What creature was Will Smith's codename in the movie Independence day?,Eagle
121
+ Animals,A lepidopterist collects?,Butterflies & moths
122
+ Animals,Moby Dick was what color?,White
123
+ Animals,On the top of the Calcutta Cup what animal will you find?,Elephant
124
+ Animals,What's a Natterjack?,A Toad
125
+ Animals,What's the smallest bird in the world?, The Hummingbird
126
+ Animals,Scooby Doo is what kind of dog?,Great Dane
127
+ Animals,Which animals does Lupine relate to?,Wolves
128
+ Animals,This extinct creature got its name from the portuguese for stupid?,Dodo
129
+ Animals,An octopus has how many hearts?,3
130
+ Animals,Fish get oxygen through which organ?,Gills
131
+ Animals,The Offspring of a male donkey and a female horse is called what?,A mule
132
+ Animals,This Flightless Bird lays the World's largest Eggs?,Ostrich
133
+ Animals,What was it that Killed Cleopatra?,An asp
134
+ Animals,A whales breathing organs are called what?,Lungs
135
+ Animals,After mating which aptly named spider devours its partner?,The Black Widow
136
+ Animals,The dog fish is what type of fish?,A shark
137
+ Animals,To signal the end of the flood which bird brought back a twig to Noah?dove,The
138
+ Animals,A Saki is what type of animal?,A Monkey
139
+ Animals,What's a Wessex Saddleback?,A Pig
140
+ Animals,A Harlequin is what type of bird?,A duck
141
+ Animals,A sidewinder is what type of creature?,A snake
142
+ Food,What milk product did the U.S. Agriculture Department propose as a substitute for meat in school lunches in 1996?,Yogurt
143
+ Food,What breakfast cereal was Sonny the Cuckoo Bird cuckoo for?,Cocoa Puffs
144
+ Food,On what vegetable did an ancient Egyptian place his right hand when taking an oath?,The onion
145
+ Food,How many flowers are in the design stamped on each side of an Oreo cookie?,Twelve
146
+ Food,Black-eyed peas are not peas. What are they?,Beans
147
+ Food,Under what name did the Domino's Pizza chain get its start?,DomNick's
148
+ Food,What was margarine called when it was first marketed in England?,Butterine
149
+ Food,What are the two top selling spices in the world?,Pepper and mustard
150
+ Food,What was the name of Cheerios when it was first marketed 50 years ago?,Cheerioats
151
+ Food,What flavor of ice cream did Baskin-Robbins introduce to commemorate America's landing on the moon on July 20 1969?,Lunar Cheesecake
152
+ Food,What is the most widely eaten fish in the world?,The Herring
153
+ Food,What is the name of the evergreen shrub from which we get capers?,caper bush
154
+ Food,What animals milk is used to make authentic Italian mozzarella cheese?,The water buffalo's
155
+ Food,What nation produces two thirds of the world's vanilla?,Madagascar
156
+ Food,What was the drink we know as the Bloody Mary originally called?,The Red Snapper
157
+ Food,What was the first commercially manufactured breakfast cereal?,Shredded Wheat
158
+ Food,When Birdseye introduced the first frozen food in 1930 what did the company call it?,Frosted Food
159
+ Food,What American city produces most of the egg rolls sold in grocery stores in the United States?,Houston Texas
160
+ Food,What was the first of H.J. Heinz' 57 varieties?,Horseradish
161
+ Food,What is the literal meaning of the Italian word linguine?,Little tongues
162
+ Food,Where did the pineapple plant originate?,South America
163
+ Food,What recipe first published 50 years ago has been requested most frequently through the years by the readers of Better Homes and Garden?,Hamburger Pie
164
+ Food,What is the only essential vitamin not found in the white potato?,Vitamin A
165
+ Food,What food is the leading source of salmonella poisoning?,Chicken
166
+ Food,What company first condensed soup in 1898?,Campbell's
167
+ Food,What nutty legume accounts for one sixth of the world's vegetable oil production?,The peanut
168
+ Food,What country saw the cultivation of the first potato in 200 A.D.?,South America
169
+ Food,What type of lettuce was called Crisphead until the 1920s?,Iceberg lettuce
170
+ Food,What tree gives us prunes?,The plum tree
171
+ Food,What type of chocolate was first developed for public consumption in Vevey Switzerland in 1875?,Milk Chocolate
172
+ Food,What added ingredient keeps confectioners' sugar from clumping?,Corn starch
173
+ Food,What edible comes in crimmini morel oyster and wood ear varieties?,Mushrooms
174
+ Food,What newly-imported substance caused the first major outbreak of tooth decay in Europe in the1500's?,Sugar
175
+ Food,What ingredient in fresh milk is eventually devoured by bacteria causing the sour taste?,Lactose
176
+ Food,What uncooked meat is a trichina worm most likely to make a home in?,Pork
177
+ Food,What baking ingredient sprayed at high pressure did the U.S. Air Force replace its toxic paint stripper with?,Baking soda
178
+ Food,What staple is laced with up to 16 additives including plaster of paris to stay fresh?,Bread
179
+ Food,What falling fruit supposedly inspired Isaac Newton to write the laws of gravity?,An Apple
180
+ Food,What method of preserving food did the Incas first use on potatoes?-drying,Freeze
181
+ Food,What drupaceous fruit were Hawaiian women once forbidden by law to eat?,The coconut
182
+ Food,What hit the market alongside spinach as the first frozen veggies?,Peas
183
+ Food,How many sizes of chicken eggs does the USDA recognize including peewee?,Six
184
+ Food,What are de-headed de-veined an sorted by size in a laitram machine?,Shrimp
185
+ Food,What's the only fish that produces real caviar according to the FDA?,Sturgeon
186
+ Food,What's the groundnut better known as?frequently used to enhance the flavor to TV dinners?,The peanutWhat crystalline salt is
187
+ Food,What type of egg will yield 11 and one-half average-size omelettes?,Ostrich egg
188
+ Food,What sticky sweetener was traditionally used as an antiseptic ointment for cuts and burns?,Monosodium glutamate
189
+ Food,What should your diet be high in to lessen the chance of colon cancer according to a 1990 study?,Honey
190
+ Food,What nut do two-thirds of its U. S. producers sell through Blue Diamond?,Fiber
191
+ Food,What type of oven will not brown foods?,The Almond
192
+ Food,What type of food did Linda McCartney launch?,Microwave oven
193
+ Food,What type of tree leaves are the only food that a koala bear will eat?,Vegetarian food
194
+ Food,Which country in Europe consumes more spicy Mexican food than any other?,Eucalyptus
195
+ Food,The FDA approved what fat substitute for use in snack foods even though there were reports of side affects like cramps and diarrhea?,Norway
196
+ Food,Federal labeling regulations require how much caffeine be removed from coffee for it to be called decaffeinated?,Olestra
197
+ Food,What famous Greek once advisedLet your food be your medicine and your medicine be your food?,Ninety seven percent
198
+ Food,Chicken is the leading cause of what food born illness?,Hippocrates poisoning
199
+ Food,Who invented Margarine in 1868?,Salmonella
200
+ Food,What group of people were the first to use freeze-drying on potatoes?Incas,Hyppolyte Merge-mouries
201
+ Food,What was the Teenage Mutant Ninja Turtles favorite food?,The
202
+ Food,What food was considered the food of the Gods and was said to bring eternal life to anyone who ate it?,Pizza
203
+ Food,What was the convenience food that Joel Cheek developed?,Ambrosia
204
+ Food,The song Food Glorious Food was featured in which musical?,Instant Coffee
205
+ Food,Of the Worlds food crops what percentage is pollinated by insects?percent,Oliver
206
+ Food,The Giant panda's favorite food is what?,80
207
+ Food,Which entertainer on Conan O'Brien's show choose NBC cafeteria chicken over his own brand in a blind taste test?,Bamboo shoots
208
+ Food,What drink was sold as Diastoid when first introduced?,Kenny Rogers
209
+ Food,What type of micro organism makes up the base of marine and freshwater food chains?,Malted milk
210
+ Food,What type of creature builds a lodge in which to store food rear its young and pass the winter?,Plankton
211
+ Food,What fruit or vegetable was dubbed the FlavrSavr and was the first genetically engineered food sold in the United States?,Beaver
212
+ Food,What fitness guru appeared as a dancing meatball in an Italian TV commercial as an art student?,The tomato
213
+ Food,What Olympic athlete could not run the 200-meter final in the 92 Olympics because of food poisoning?,Richard Simmons
214
+ Food,What morning food has a name derived from the German word for stirrup?,Michael Johnson
215
+ Food,In 1904 what food product was renamed Post Toasties cereal because the clergy objected to the original name?,Bagel
216
+ Food,In the United States what are the five most frequently eaten fruits?,Elijah's Manna
217
+ Food,Which country does Rioja Wine come from?,bananaapplewatermelonorangecantaloupe
218
+ Food,The juice of which fruit will you find in a bloody mary?,Spain
219
+ Food,Homer Simpson drinks Which brand of beer regularly?,Tomato
220
+ Food,What is the main ingredient of paella?,Duff
221
+ Food,What would you call a segment of garlic?,Rice
222
+ Food,A canteloupe is what kind of fruit?,Clove
223
+ Food,Sticky and sweet this food is produced in a hive?,Melon
224
+ Food,This dairy product tastes good on crackers and sandwiches or on its own?,Honey
225
+ Food,In the dish of Beef Wellington in what is the beef wrapped?,Cheese
226
+ Food,What is The Teenage Mutant Ninja Turtles favourite food?,Pastry
227
+ Food,What is the main vegetable ingredient in the dish Borsht?,Pizza
228
+ Food,Sauerkraut is pickled what?,Beetroot
229
+ Food,What vegetable is also known as zucchini in the USA?,Cabbage
230
+ Food,This fruit goes into the liqueur Kirsch?,Courgette
231
+ Food,A bloomer is what type of food?,Cherry
232
+ Food,Which is the fruit that contains the most calories?,Bread
233
+ Food,What is lava bread?,Avocado pear
234
+ Food,What fruit grows on the blackthorn tree?,Seaweed
235
+ Food,Which food has a name which means on a skewer?,Sloe
236
+ Food,In a Mcdonald's Big Mac how many pieces of bun are there?,Kebab
237
+ Food,Oyster Chestnut or Shitaki are types of which vegetable?,Three
238
+ Food,A Calzone Is A Folded Stuffed What?,Mushrooms
239
+ Food,Which country invented the Marmite alternative - Veggie mite?,Pizza
240
+ Food,Which country does the dish Mousakka come from?,Australia
241
+ Food,Which fruit served with cream is eaten during the summer tennis tournament Wimbledon?,Greece
242
+ Food,Apart from potato What is the other main ingredient of Bubble and Squeak?,Strawberries
243
+ Food,Which food was popular with Popeye the Sailor?,Cabbage
244
+ Food,What is Scooby Doo`s favourite food?,Spinach
245
+ Food,What is the only fruit that grows its seeds on the outside?,Scooby Snacks
246
+ Food,What other names are sardines known by?,Strawberry
247
+ Food,Which city gave its name to a three-coloured Neapolitan ice-cream?,Pilchards
248
+ Food,What would you be drinking if you were drinking Earl Grey?,Naples
249
+ Food,What are Pontefract cakes made from?,Tea
250
+ Food,What is another name for almond paste?,Liquorice
251
+ Food,What name can be a lettuce or a mass of floating frozen water?,Marzipan
252
+ Food,What's Sauerkraut's main ingredient?,Iceberg
253
+ Food,What's the only rock edible to man?,Cabbage
254
+ Food,What type of salad do you need apple celery walnuts raisins and mayonnaise mixed together?,Salt
255
+ Food,Which fruit also shares its name with Gwyneth Paltrow's daughter?,Waldorf Salad
256
+ Food,From which animal does haggis come?,Apple
257
+ Food,In cockney rhyming slang what is Ruby Murray?,Sheep
258
+ Food,What cake do you keep a layer of to eat at the christening of your first child?,Curry
259
+ Food,Which brand of frozen ice cream cone was advertised to the tune of Italian song O Sole Mio?,Wedding Cake
260
+ Food,If I take two apples out of a basket containing six apples how many apples do I have ?,Cornetto
261
+ Food,Which fruit does one of Bob Geldofs' daughter share a name with?,Two
262
+ Food,In Eggs Florentine which vegetable is a main ingredient?,Peaches
263
+ Food,In a French restaurant what would you be eating if you chose escargots?,Spinach
264
+ Food,Which meat is usally in a Shish Kebab?,Snails
265
+ Food,What flavour is Ouzo?,Lamb
266
+ Food,A crapulous person is full of what?,Aniseed
267
+ Food,What Italian Cheese usually tops a pizza?,Alcohol
268
+ Food,Port Salut is what?,Mozzarella
269
+ Food,Who talked of eating human liver washed down with Chianti?,Cheese
270
+ Food,Who according to the TV commercial ‘makes exceedingly good cakes’?Kipling,Hannibal Lecter
271
+ Food,What vegetable is sold mainly before 30th October?,Mr
272
+ Food,Whats the english translation for the french word crepe?,Pumpkin
273
+ Food,What is a macadamia?,Pancake
274
+ Food,In ancient Egypt what was liquorice used for?,Nut
275
+ Food,What type of thin pancake is eaten in Mexico?,Medicine
276
+ Food,If steak was blue how would it be cooked?,Tortilla
277
+ Food,Baked beans are made from which beans?,Very Rare
278
+ Food,What are small cubes of toasted or fried bread?,Haricot
279
+ Food,What would you call a cluster of bananas?,Croutons
280
+ Food,What nuts are used to flavour amaretto?,A hand
281
+ Food,If you had frijoles refritos in a Mexican restaurant it would be refried what?,Almonds
282
+ Food,This city is famous for its oranges?,beans
283
+ Food,Which celebrity chef was nicknamed 'The Naked Chef'?,Seville
284
+ Food,What daily vegetable do typical boxer's ears look like?,Jamie Oliver
285
+ Food,What's a small pickled cucumber?,Cauliflower
286
+ Food,What's cockney rhyming slang for eyes?,Gherkin
287
+ Food,What name's given to a small deep fried chinese dumpling with a savoury filing?,Mince Pies
288
+ Food,Which brand of beer features a kangaroo on the packaging?,Won ton
289
+ Food,A mint with a hole?,Fosters
290
+ Food,What is advertised on TV with the slogan You either Love it or Hate it?,Polo
291
+ Food,In Ancient China what variety of meat was reserved exclusively for the emperor?,Marmite
292
+ Food,Which song mentions saveloy mustard jelly custard and sausages in the lyrics?,Pork
293
+ Food,Jasmine and long grain are both types of what?,Food Glorious Food
294
+ Food,What might you be eating at Wimbledon if you had a Cambridge Rival in your mouth?,Rice
295
+ Food,What fruit was originally called a Chinese gooseberryKiwi Fruit,Strawberry
296
+ Food,What sort of pastry is used to make profiteroles?,Choux
297
+ Food,What is the national dish of Hungary?,Goulash
298
+ Food,Which nut is used to flavour traditional Bakewell Tart?,Almond
299
+ Food,In the dish of Beef Wellington in what is the beef wrapped?,Pastry
300
+ Food,What is the main vegetable used to make Borsch?,Beetroot
301
+ Food,What is Bombay Duck?,Fish
302
+ Food,Which fruit is used in the making of a Black Forest Gateau?,Black Cherries
303
+ Food,What is included in a BLT sandwich?,Bacon lettuce and tomato
304
+ Food,The name of what food when translated means twice-cooked?,Biscuit
305
+ Food,How many calories are there in a stick of celery?,None
306
+ Food,Which country consumes the most pasta per person per year?,Italy
307
+ Food,What was the favourite food of Paddington Bear?,Marmalade
308
+ Food,Which family of vegatables are Chives from?,Onions
309
+ Food,In the Hansel and Gretel tale what was the wicked witch's house made of?,Gingerbread
310
+ Food,What take-away is traditional in England at the seaside?,Fish and chips
311
+ Food,What meat is Coq au vin made with ?,Chicken
312
+ Food,Which cheese is made in reverse?,Edam
313
+ Food,What variety of banana shares its name with the title of a Bond movie?,Goldfinger
314
+ Food,Conference Bartlett and Kaiser are all varieties of which fruit?,Pear
315
+ Food,Which product is advertised on TV with the slogan “Once you pop you can’t stop”?,Pringles
316
+ Food,What is the official national cheese of Greece?,Feta
317
+ Food,Which variety of orange was named after a Japanese province?,Satsuma
318
+ Food,Marzipan is made from which nuts?,Almonds
319
+ Food,During brewing what is converted into alcohol?,Sugar
320
+ Food,This chick pea pureé is flavoured with tahini and served as a dip?,Hummus
321
+ Food,Grolsch lager is from which country?,Holland
322
+ Food,This carbohydrate fruit is high in potassium?,Banana
323
+ Food,What overtook coca-cola as the most well known brand name (in the world) in 1996?,McDonalds
324
+ Food,The 'M' in the McDonalds logo is what colour?,Yellow
325
+ Food,Bacardi Rum's logo features which creature?,Bat
326
+ Food,An egg plant is also known as which vegetable?,Aubergine
327
+ Food,What is a light round bun usually served hot?,Muffin
328
+ Food,What is the plant that wards off vampires?,Garlic
329
+ Food,The Teenage Mutant Ninja Turtles favourite food is?,Pizza
330
+ Food,The main vegetable ingredient in the dish Borsht is what?,Beetroot
331
+ Food,Sauerkraut is pickled what?,Cabbage
332
+ Food,Chicory was a war time substitute for what drink?,Coffee
333
+ Food,What vegetable is also known as zucchini in the USA?,Courgette
334
+ Food,This fruit goes into the liqueur Kirsch?,Cherry
335
+ Food,A bloomer is What type of food?,Bread
336
+ Food,This type of milk is a basic ingredient in Thai cookery?,Coconut milk
337
+ Food,What soft drink uses this slogan What's the worst that could happenDr Pepper,Avocado pear
338
+ Food,Which is the fruit that contains the most calories?,Plums
339
+ Food,What are dried prunes?,Oats
340
+ Food,The main cereal ingredient of flapkacks (Hudson Bars in USA)?,Creme
341
+ Food,What is the correct spelling of a Cadbury Creame/Creem/Creme/Cream Egg?,Bananas
342
+ Food,What is Uganda's staple crop which each adult consumes over 3 times bodyweight annually?,Seaweed
343
+ Food,What's lava bread?,Sloe
344
+ Food,What fruit grows on the blackthorn tree?,Lemon & Melon
345
+ Food,Which two fruits are anagrams of each other?,Duff
346
+ Food,Homer Simpson drinks what brand of beer?,Acohol
347
+ Food,A crapulous person is full of what?,Sangria
348
+ Food,What spanish drink consists of sweet red wine lemonade or soda water and decorated with fruit?,Vodka
349
+ Food,This spirit is the base for a Black Russian cocktail?,Holland
350
+ Food,What country is home to Grolsch lager?,Alcohol
351
+ Food,A crapulous person is full of what?,Cayenne Pepper
352
+ Food,What is the name of this hot red chilli pepper it is often dried and ground?,Green
353
+ Food,What's colour of the inside of a pistachio nut?,Sugar
354
+ Food,This is converted into alcohol during brewing?,Basil
355
+ Food,This herb is used to make a Pesto sauce?,Very
356
+ Food,When a wine is described as 'brut' what does it mean about the taste?Dry,Lamb
357
+ Food,The usual main meat ingredient of a Shish Kebab is?,A hot dog
358
+ Food,What do the brits call a Weenie?,Dairy
359
+ Food,The D where milk is processed?,Turmeric
360
+ Food,What spice gives piccalilli and curries its yellow colour?,Potatoes
361
+ Food,Hash Browns are normally made from which vegetables?,Bacon
362
+ Food,Prunes stuffed with almonds are wrapped in what to make Devils on horseback?,Rice
363
+ Food,The main ingredient of a Paella is what?,Cabbage
364
+ Food,The main ingredient of Sauerkraut is what?,Kebab
365
+ Food,This food has a name which means on a skewer?,Three
366
+ Food,In a Mcdonald's Big Mac how many pieces of bun are there?,Mushrooms
367
+ Food,Oyster Chestnut or Shitaki are types of which vegetable?,Orange
368
+ Food,What is the only fruit named for its colour?,Apple
369
+ Food,Traditionally at a fair ground what fruit would be covered with toffee?,Aniseed
370
+ Food,This herb is used to flavour Pernod?,Coconut milk
371
+ Food,This milk is a basic ingredient in Thai cookery?,Hardware
372
+ The generic term for the mechanical electrical and electronic components of a computer are called what?,ADA
373
+ Computers,Which computer language is an acronym of the name of the world's first computer programmer?,W
374
+ Computers,What letter is between Q and E on a computer keyboard?,Multi User Computer Game
375
+ Computers,In computer lingo what is a MUD?,Apple
376
+ Computers,What kind of fruit was used to name a computer in 1984?,Computer
377
+ Computers,In what field of study are the terms CPU PC and VDU used?Science,Computer
378
+ Computers,From what source did William Henry Gates III amass his fortune?software,Weebo the computer
379
+ Computers,Charlie the pet dog was replace by what in the remake of the Absent-minded Professor called Flubber in 1997?,Computer
380
+ Computers,What did Charles Babbage invent when he designed his analytical engine in 1833?,Star Wars
381
+ Computers,Movie maker George Lucas Filed a law suit against President Ronald Reagan to get him to stop referring to an outer space computer controlled defense system as what?,4:20 p.m.
382
+ Computers,What time doe the computer virus W32.MARIJUANA interrupt you to suggest taking a break?,The letters
383
+ Computers,Hal the computer in 2001A Space Odyssey got its name how?before I B and M,Toy Story
384
+ Computers,Pixar created a 1995 blockbuster hit move using computer animation. What was the title of the movie?,IBM corporation
385
+ Computers,Which computer company dropped the Play Station line and created an Aptiva brand computer for home users?,Linux
386
+ Computers,Red Hat and Yellow Dog are computer outfits that distributed an alternative computer operating system. What was the name of the system?,Deep
387
+ Computers,The Electronic Frontier Foundation named its $250000 computer designed to crack the U.S. government's outdated DES cryptographic code what?Crack,Silicon
388
+ Computers,What common element is used in the manufacture of computer chips?,Michelangelo
389
+ Computers,On the birthday of a famous painter every March 6th what computer virus strikes?,Ally McBeal
390
+ Computers,The Dancing Baby computer generated 3D image danced it's way onto what TV show in 1998?,Ted Kennedy
391
+ Computers,What U.S. Democratic senator had the first internet home page?,To compute ballistic trajectories for artillery shells
392
+ Computers,Originally ENIAC the world's first modern computer was constructed to do what?,HITMAN
393
+ Computers,The Los Angeles Police Department developed a computer program to help solve homicides. What was it called?,MANIAC
394
+ Computers,The first computer used for weather research was named what?,Liquid Crystal Display
395
+ Computers,The displays commonly found in notebook and laptop computers are called what?,Kevin Mitnick
396
+ Computers,After breaking into physicist Tsutomu Shimomura's computer on Christmas in 1994 what legendary hacker was taken down?,Amiga
397
+ Computers,What personal computer became a video production system with the addition of New Tek's Video Toaster?,Intel
398
+ Computers,Digital Equipment Corporation sued what computer chip manufacturer claiming it stole the technology to develop the Pentium Pro?Corporation,PASCAL
399
+ Computers,What was the name of the computer language named after a French philosopher and mathematician?,Apple
400
+ Computers,What was the name of the computer company that was named after the founder's memories of a summer in an Orchard in Oregon?,
401
+ Computers
402
+ Sports,Who was the first US volleyball player to win three Olympic gold medals?,Karch Kiraly
403
+
404
+ Sports,What hide was first used to cover baseballs in 1975?,Cowhide
405
+
406
+ Sports,What country's first US major league baseball player was Chan-Ho Park?,South Korea
407
+
408
+ Sports,Which two cities have the oldest stadiums in major league baseball?,Boston and Detroit
409
+
410
+ Sports,What baseball team's games are announced on TV by Skip Carey?,The Atlanta Braves
411
+
412
+ Sports,What shortstop holds the major league records for games played assists and double plays?,Ozzie Smith
413
+
414
+ Sports,What pitcher's 112 ERA in 1968 is the lowest in the majors in post-World War II play?,Bob Gibson
415
+
416
+ Sports,Who was the last American League baseballer to win the Triple Crown, in 1967?,Car Yastrzemski
417
+
418
+ Sports, What Pittsburgh Pirate had exactly 3,000 career hits before dying in a plane crash?,Roberto Clemente
419
+
420
+ Sports,What's the LCS to a baseball pennant winner?,League Championship Series
421
+
422
+ Sports, What was pitcher Dock Ellis the first major leaguer to wear in his on the field?,Curlers
423
+
424
+ Sports, How many seasons did Lou Gehrig play every inning of every game?,One
425
+
426
+ Sports,What ballpark was Pete Rose playing in when he broke Ty Cobb's career hits record?,Riverfront Stadium
427
+
428
+ Sports,What major league baseball team did the Walt Disney Company assumee operational control of in 1996?,The California Angels
429
+
430
+ Sports,How many seasons saw Hank Aaron blast 50 or more homers?,Zero
431
+
432
+ Sports, Who holds the record for most innings pitched in a major league season?,Cy Young
433
+
434
+ Sports,What explosive base-stealer took a $275 million pay cut to play for the Kansas City Royals, in 1995?,Vince Coleman
435
+
436
+ Sports,What major league baseball team was forced to endure a 20-day road trip in 1996?,The Atlanta Braves
437
+
438
+ Sports,What Beantowner is second only to Pete Rose in total major league baseball games played?,Carl Yastrzemski
439
+
440
+ Sports, What's the most home runs hit by one player in a single major league game?,Four
441
+
442
+ Sports, What establishments were 90 percent of the viewers watching the first televised World Series from?,Bars
443
+
444
+ Sports,What did Babe Ruth, Rogers, Hornsby, Ted Williams and Willie Mays all do in their first major league at-bats?,Strike out
445
+
446
+ Sports,What former Giants star is the godfather of Barry Bonds?,Willie Mays
447
+
448
+ Sports,What governor was on hand at home plate to greet Hank Aaron when he broke Babes Ruth's home run record?,Jimmy Carter
449
+
450
+ Sports,What boxing class is heaviest - flyweight, bantam weight or feather weight?,Feather weight
451
+
452
+ Sports,What nickname do boxing fans call 300 pound Eric Esch King of the Fouro-Rounders?,Butter Bean
453
+
454
+ Sports,What boxer made his first title defense in 21 years, in 1995?,George Foreman
455
+
456
+ Sports,What percentage of Mike Tyson's 1995 earnings came from endorsements?,Zero
457
+
458
+ Sports, Who received a reported $25 million for a 1995 boxing match that lasted 89 seconds?,Mike Tyson
459
+
460
+ Sports,How old was George Foreman when he became the oldest heavyweight champ in history?,45
461
+
462
+ Sports, What pro sport gives its participants an 87 percent chance of suffering brain damage?,Boxing
463
+
464
+ Sports, What boxing weight class is limited to 190 pounds?,Cruiserweight
465
+
466
+ Sports,What Mexican boxing champ lost for the first time to little known Frankie Randall?,Julio Cesar Chavez
467
+
468
+ Sports,What had to occur for a round to end when John L Sullivan beat Jake Killrain in 75 rounds, in 1889?,A knockdown
469
+
470
+ Sports,Who was the first sports announcer to address Muhammad Ali by his Muslim name?,Howard Cosell
471
+
472
+ Sports,What year in the 1970s was Muhammad Ali's last as heavyweight champ?,1979
473
+
474
+ Sports, What boxing promoter was indicted for filing a false insurance claim with Lloyds of London?,Don King
475
+
476
+ Sports,What boxer successfully defended his title against George Foreman and Larry Holmes?,Evander Holyfield
477
+
478
+ Sports,Who reigned as heavyweight boxing champ of Uganda from 1951-1960?,Idi Amin
479
+
480
+ Sports,What did boxer Nelson Azumah change his name to?,Azumah Nelson
481
+
482
+ Sports,What Ivy League football team once lost an NCAA record 44 straight games?,Columbia
483
+
484
+ Sports,What budding politician led the AFL in passing yards for the 1960s?,Jack Kemp
485
+
486
+ Sports,Who played defensive back for the New York Giants before he coached the Cowboys?,Tom Landry
487
+
488
+ Sports, What football league had expansion teams in Baltimore Las Vegas and Shreveport for the 1994 season?,The Canadian Football League
489
+
490
+ Sports,How many points was a touchdown worth in 1911?,Five
491
+
492
+ Sports, What university's football team played in the first seven Holiday Bowls?,Brigham Young's
493
+
494
+ Sports, What NFL team did Rafael Septien boot balls for from 1978 to 1986?,The Dallas Cowboys
495
+
496
+ Sports, What National Football Conference division do the Lions, Bears and Packers play in?,The Central Division
497
+
498
+ Sports, What Dallas quarterback fumbled a record five times in four Super Bowl games?,Roger Staubach
499
+
500
+ Sports,Whose NFL playing career began in 1949 and ended in 1975?,George Blanda
501
+
502
+ Sports,What sportscaster posted an NFL coaching record of 103-22-7?,John Madden
503
+
504
+ Sports, What three NFL teams had lost four Super Bowls each, through 1996?, Buffalo Bills, Denver Broncos,Minnesota Vikings
505
+
506
+ Sports,What were NFL players required to wear in games for the first time in 1943?,Helmets
507
+
508
+ Sports,How many teams graced the NFL after the AFL officially joined the told in 1970?,26
509
+
510
+ Sports,What Ivy League football team once lost an NCAA record 44 straight games?,Columbia
511
+
512
+ Sports,What budding politician led the AFL in passing yards for the 1960s?,Jack Kemp
513
+
514
+ Sports,Who played defensive back for the New York Giants before he coached the Cowboys?,Tom Landry
515
+
516
+ Sports,How many points was a touchdown worth in 1911?,5
517
+
518
+ Sports, What NFL team did Rafael Septien boot balls for from 1978 to 1986?,Dallas Cowboys
519
+
520
+ Sports, What National Football Conference division do the Lions, Bears and Packers play in?,The Central Division
521
+
522
+ Sports, What Dallas quarterback fumbled a record five times in four Super Bowl games?,Roger Staubach
523
+
524
+ Sports,What were NFL players required to wear in games for the first time in 1943?,Helmets
525
+
526
+ Ruby,What year was the Ruby programming language written in?,1993
527
+
528
+ Ruby,What array method deletes the element(s) given by an index (optionally up to length elements) or by a range?,slice!
529
+
530
+ Ruby,What array method returns a new array by removing duplicate values in self?,uniq
531
+
532
+ Ruby,Who wrote the Ruby programming language?,Yukihiro Matsumoto
533
+
534
+ Ruby,What array method calls the given block once for every element in self passing that element as a parameter?,each
535
+
536
+ Ruby,What array method returns true if self contains no elements?,empty?
537
+
538
+ Ruby,What array method returns true if self and other are the same object or are both arrays with the same content (according to Object#eql?)?,eql?
539
+
540
+ Ruby,What array method returns true if the given object is present in self (that is if any element == object) otherwise returns false?,include?
541
+
542
+ Ruby,What method creates a string representation of self?,inspect
543
+
544
+ Ruby,What array method deletes every element of self for which the given block evaluates to false?,keep_if
545
+
546
+ Ruby,What method returns the number of elements in self?,length
547
+
548
+ Ruby,What method invokes the given block once for each element of self, replacing the element with the value returned by the block?,map
549
+
550
+ Ruby,What array method removes the last element from self and returns it or nil if the array is empty?,pop
551
+
552
+ Ruby,What array method returns a new array containing the items in self for which the given block is not true?,reject
553
+
554
+ Ruby,What array method chooses a random element or n random elements from the array?,sample
555
+
556
+ Ruby,What array method removes the first element of self and returns it (shifting all other elements down by one). Returns nil if the array is empty?,shift
557
+
558
+ Ruby,What array method returns self?,to_a
559
+
560
+ Ruby,What string method returns the length of str in bytes?,bytesize
561
+
562
+ Ruby,What string method returns a new String with the last character removed?,chop
563
+
564
+ Ruby,What string method makes the string emptpy?,clear
565
+
566
+ Ruby,What string method produces a version of str with all non-printing characters replaced by \nnn notation and all special characters escaped?,dump
567
+
568
+ Ruby,What string method passes each character in str to the given block, or returns an enumerator if no block is given?,each_char
569
+
570
+ Ruby,What string method returns true if str has a length of zero?,empty?
571
+
572
+ Ruby,What string method returns a copy of str with the all occurrences of pattern substituted for the second argument?,gsub
573
+
574
+ Ruby,What hash method deletes every key-value pair from hsh for which block evaluates to false?,keep_if
575
+
576
+ Ruby,What does MVC standfor?,Model View Controller
577
+
578
+ Ruby,Who invented Ruby on Rails?,David Heinemeier Hansson
579
+
580
+ Ruby,What year was Rails invented?,2003
581
+
582
+ Ruby,Who invented RubyMotion?,Laurent Sansonetti
583
+
584
+ Ruby,What is nil * nil in Ruby?,undefined method `*' for nil:NilClass
585
+
586
+ Ruby,What is the highest level in the object model?,BasicObject
587
+
588
+ Ruby,Is everything in Ruby an object?,No
589
+
590
+ Ruby,Which core object includes the Kernel module?,Object
591
+
592
+ Ruby,What can you say about an identifier that begins with a capital letter?,Constant
593
+
594
+ Ruby,Is Ruby a statically typed or a dynamically typed language?,Dynamically
595
+
596
+ Ruby,Is Ruby a strongly typed or a weakly typed language?,Strongly typed
597
+
598
+ Ruby,Does String include the Enumerable module?,No
599
+
600
+ Ruby,What is the difference between a character literal such as ?A and a string literal such as A?,There is no difference.
601
+
602
+ Ruby,Does String include the Enumerable module?,No
603
+
604
+ Ruby,Which operator must be defined in order to implement the Comparable module?,<=>
605
+
606
+ Ruby,Which binds more tightly? && or and,&&
607
+
608
+ Ruby,Which binds more tightly? && or =,&&
609
+
610
+ Ruby,Which binds more tightly? and or =,=
611
+
612
+ Ruby,Which binds more tightly? && or ||,&&
613
+
614
+ Ruby,Does a while block define a new scope?,No
615
+
616
+ Ruby,Does the case statement in Ruby have fall-through behavior?,No
617
+
618
+ Ruby,Does a rescue block define a new scope?,No
619
+
620
+ Ruby,What is the synonym of Enumerable#include?,member?
621
+
622
+ Ruby,Can a collection be modified while it is being iterated upon?,Yes
623
+
624
+ Ruby,Is a block an object?,No
625
+
626
+ Ruby,What is the synonym of Enumberable#collect?,map
627
+
628
+ Ruby,What is the synonym of Enumberable#find?,detect
629
+
630
+ Ruby,What is the synonym of Enumberable#select?,find_all
631
+
632
+ Ruby,What is the opposite of Enumberable#select?,reject
633
+
634
+ Ruby,What is the synonym of Enumberable#inject?,reduce
635
+
636
+ Ruby,Does Ruby support method overloading?,No
637
+
638
+ Ruby,What is the meaning of self?,The current object.
639
+
640
+ Ruby,Is a method an object?,No
641
+
642
+ Ruby,What must you first do before you can invoke an UnboundMethod object?,bind
643
+
644
+ Ruby,Are method objects closures?,No
645
+
646
+ Ruby,How do you obtain a Method object from an existing module/class?,Using Object#method
647
+
648
+ Ruby,Are constants public or private?,Public
649
+
650
+ Ruby,Can methods be added to a Struct?,Yes
651
+
652
+ Ruby,Which popular social media site was build on Rails...Facebook Twitter or MySpace?,Twitter
653
+
654
+ Ruby,Who is the best programmer to ever live?,Dylan Shine
655
+
656
+ Ruby,Who is the author of POODR?,Sandi Metz
657
+
658
+ Ruby,Is Sandi Metz a man or a women?,women
659
+
660
+ Ruby,What programming style is better...metaprogramming or object oriented?,object oriented
661
+
662
+ Ruby,What does TDD standfor?,Test driven development
663
+
664
+ Ruby,What does CoC standfor?,convention over configuration
665
+
666
+ Ruby,What does DRY standfor?,don't repeat yourself
667
+
668
+ Ruby,What hash method rebuilds the hash based on the current hash values for each key. If values of key objects have changed since they were inserted this method will reindex hsh?,rehash
669
+
670
+ Ruby,What hash method returns a new hash created by using hsh’s values as keys, and the keys as values?,invert
671
+
672
+ Ruby,What method is invoked by Ruby when an obj is sent a message it cannot handle?,method_missing
673
+
674
+ Ruby,When max is an Integer, ..blank.. returns a random integer greater than or equal to zero and less than max?,rand
675
+
676
+ Ruby,What time method returns true if time occurs during Daylight Saving Time in its time zone?,dst?
677
+
678
+ Ruby,What method combines all elements of enum by applying a binary operation, specified by a block or a symbol that names a method or operator?,inject
679
+
680
+ Ruby,What method returns two arrays the first containing the elements of enum for which the block evaluates to true the second containing the rest?,partition
681
+
682
+ Ruby,What method passes elements to the block until the block returns nil or false then stops iterating and returns an array of all prior elements?,take_while
683
+
684
+ Ruby,Who developed the Sinatra web application framework?,Blake Mizerany
685
+
686
+ Ruby,What Ruby operator divides left hand operand by right hand operand and returns remainder?,%
687
+
688
+ Ruby,What Ruby operator performs exponential (power) calculation on operators?,**
689
+
690
+ Ruby,What Ruby operator add AND assignment operator It adds right operand to the left operand and assign the result to left operand?,+=
691
+
692
+ Ruby,What Ruby operator is moved left by the number of bits specified by the right operand?,<<
693
+
694
+ Ruby,What Ternary operator represents a Conditional Expression?,?:
695
+
696
+ Ruby,What syntax is used to define a global variable?,$
697
+
698
+ Ruby,What syntax is used to define a class variable?,@@
699
+
700
+ Ruby,What syntax is used to define an instance variable?,@
701
+
702
+ Ruby,What does IRB standfor?,Interactive Ruby Shell
703
+
704
+
705
+
706
+
707
+
708
+
709
+
710
+
711
+
712
+
713
+
714
+
715
+
716
+
717
+
718
+
719
+
720
+
@@ -0,0 +1,67 @@
1
+ require "csv"
2
+
3
+ class Player
4
+ attr_accessor :instance_variables, :user_name, :score
5
+ def initialize(args)
6
+ @instance_variables = args
7
+ @user_name = args[:user]
8
+ @score = args[:score]
9
+ end
10
+ end
11
+
12
+
13
+ class HighScores
14
+
15
+ include CSVParser
16
+ attr_reader :user, :final_score
17
+ def initialize(user, score)
18
+ @user = user
19
+ @final_score = score
20
+ @file = "highscores.csv"
21
+ @players = nil
22
+ end
23
+
24
+ def players
25
+ return @players if @players
26
+ @players = import(@file).map {|player| Player.new player}
27
+ end
28
+
29
+ def add_player_to_highscores
30
+ @player_hash = {user_name: @user, score: @final_score.to_s}
31
+ @players << Player.new(@player_hash)
32
+ end
33
+
34
+ def save
35
+ players_as_hashes = @players.map(&:instance_variables)
36
+ export('highscores.csv', players_as_hashes)
37
+ end
38
+
39
+ def changeScore
40
+ @players.each do |player_object|
41
+ if player_does_not_exist
42
+ add_player_to_highscores
43
+ break
44
+ elsif player_object.user_name == @user && player_object.score.to_i <= @final_score
45
+ player_object.instance_variables[:score] = @final_score.to_s && player_object.score = @final_score.to_s
46
+ end
47
+ end
48
+ save
49
+ end
50
+
51
+ def player_does_not_exist
52
+ existing_users = []
53
+ @players.each do |player_object|
54
+ existing_users << player_object.user_name
55
+ end
56
+ if existing_users.include?(@user)
57
+ false
58
+ else
59
+ true
60
+ end
61
+ end
62
+
63
+ def sort_players
64
+ @players = import(@file).map {|player| Player.new player}
65
+ @players.sort { |a, b| b.score <=> a.score }
66
+ end
67
+ end
@@ -0,0 +1,4 @@
1
+ user,score
2
+ John,15
3
+ Dylan,12
4
+ Jim,1
data/lib/model.rb ADDED
@@ -0,0 +1,55 @@
1
+ #==========================PARSER=======================
2
+ require "csv"
3
+
4
+ module CSVParser
5
+
6
+ def import(file)
7
+ CSV.read(file, headers:true, header_converters: :symbol).map {|row| row.to_hash}
8
+ end
9
+
10
+ def export(filename, data)
11
+ CSV.open(filename, 'wb') do |csv|
12
+ csv << data.first.keys
13
+ data.each {|row| csv << row.values}
14
+ end
15
+ end
16
+ end
17
+
18
+ #========================= MODEL=========================
19
+
20
+ class FlashCard
21
+ # Models our flashcard objects
22
+ attr_reader :category, :question, :answer
23
+ attr_accessor :answered
24
+
25
+ def initialize(args = {})
26
+ # generates flashcard objects based on hash keys (csv fields)
27
+ @category = args[:category]
28
+ @question = args[:question]
29
+ @answer = args[:answer]
30
+ end
31
+ end
32
+
33
+
34
+ class Dealer
35
+ include CSVParser
36
+
37
+ # Pull data from the csv and parses into hashes
38
+ def initialize(file, cat)
39
+ @file = import(file)
40
+ @cards_array = @file.map{|row| FlashCard.new(row) if row[:category] == cat }
41
+ @cards_array.compact!
42
+ end
43
+
44
+ # Map csv hashes into an individual FlashCard object
45
+ def load_card #(draw card?)
46
+ @cards_array.shuffle!.shift
47
+ end
48
+
49
+ #Check users guess agains the answer for the current card.
50
+ def check(answer, guess)
51
+ #is it bad that we're calling the FlashCard class's methods on an instance variable of this class?
52
+ guess.downcase == answer.downcase
53
+ end
54
+
55
+ end
data/lib/pull.rb ADDED
@@ -0,0 +1 @@
1
+ system 'git pull origin online_updater'
data/lib/push.rb ADDED
@@ -0,0 +1,9 @@
1
+ percent = 0
2
+ time = rand(0.01..0.1)
3
+ (1..100).each{|x| sleep(time); print "Submitting your score...#{percent+=1}%\r"}
4
+ puts
5
+ print "Score successfully submitted."
6
+ puts
7
+ system 'git add -A > /dev/null 2>&1'
8
+ system 'git commit -m "Updated High Scores" > /dev/null 2>&1'
9
+ system 'git push origin online_updater > /dev/null 2>&1'
data/lib/view.rb ADDED
@@ -0,0 +1,88 @@
1
+ class View
2
+ def self.choose_category
3
+ puts '~*~'*10
4
+ puts 'Welcome to BrainSnap'
5
+ puts
6
+ puts 'Select a category:'
7
+ puts '1. Animals'
8
+ puts '2. Food'
9
+ puts '3. Computers'
10
+ puts '4. Sports'
11
+ puts '5. Ruby'
12
+ puts '~*~'*10
13
+ puts
14
+ end
15
+
16
+ def self.enter_username
17
+ puts '~*~'*10
18
+ puts 'Welcome to BrainSnap'
19
+ puts
20
+ puts "Enter Your \"Username\" to begin!"
21
+ puts '~*~'*10
22
+ puts
23
+ end
24
+
25
+
26
+ def self.user_input
27
+ gets.chomp
28
+ end
29
+
30
+ def self.start_menu
31
+ puts 'Here\'s how it works:'
32
+ puts '------------------------'
33
+ puts 'We\'ll give you question...'
34
+ sleep 2
35
+ puts '...you give us an answer. Pretty standard right?'
36
+ puts 'Type \"quit\" at any time to quit!'
37
+ end
38
+
39
+ def self.category_screen(category)
40
+ puts "The Category is #{category}"
41
+ end
42
+
43
+ def self.show_card(question)
44
+ puts "#{question}"
45
+ puts
46
+ end
47
+
48
+ def self.correct
49
+ responses = ["That's Right", "Great Job Yo", "How did you know that? That shit's crazy.", "You must be a Rock Dove.", "How do you fit such a big brain in such a small head?", "Teach me your ways Kemosabe", "Correct!", "BAM!"]
50
+ puts responses.sample
51
+ puts
52
+ end
53
+
54
+ def self.incorrect(correct_answer)
55
+ responses = ["Dang son you need to study...", "Really?", "(incorrect buzzer noise)", "Hahaha nice try.", "Outlook not so good", "Time for a beer I guess, we're in for the long haul"]
56
+ puts responses.sample
57
+ puts "The correct response is: " + correct_answer + ""
58
+ puts
59
+ end
60
+
61
+ def self.show_results(num_correct, num_incorrect)
62
+ if num_correct == 0
63
+ puts "Are you even trying?"
64
+ elsif num_incorrect == 0
65
+ puts "Holy $&^% you\'re smart!"
66
+ elsif num_correct > num_incorrect
67
+ puts "Great Work! Keep it up!"
68
+ elsif num_incorrect > num_correct
69
+ puts "You got some work to do."
70
+ end
71
+ puts "Total right: #{num_correct}"
72
+ puts '--------------------------------------'
73
+ end
74
+
75
+ def self.clear
76
+ puts "\e[H\e[2J"
77
+ end
78
+
79
+ def self.show_scores(players)
80
+ puts "High Scores:"
81
+ players.each { |player| puts "#{player.user_name}: #{player.score}" }
82
+ end
83
+ end
84
+ # test = View.new
85
+ # puts "Correct answers"
86
+ # View.correct
87
+ # puts "Incorrect answers"
88
+ # View.incorrect
metadata ADDED
@@ -0,0 +1,61 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: brainsnap
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4
5
+ platform: ruby
6
+ authors:
7
+ - Dylan Shine
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-11-30 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: This is a simple trivia game for the command line.
14
+ email:
15
+ - dylanshinenyc@gmail.com
16
+ executables:
17
+ - brainsnap
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - ".gitignore"
22
+ - Gemfile
23
+ - LICENSE.txt
24
+ - README.md
25
+ - Rakefile
26
+ - bin/brainsnap
27
+ - brainsnap.gemspec
28
+ - lib/brainsnap.rb
29
+ - lib/brainsnap/version.rb
30
+ - lib/flash_card_questions.csv
31
+ - lib/game_questions.csv
32
+ - lib/highscoreparse.rb
33
+ - lib/highscores.csv
34
+ - lib/model.rb
35
+ - lib/pull.rb
36
+ - lib/push.rb
37
+ - lib/view.rb
38
+ homepage: https://github.com/dshine112/BrainSpan
39
+ licenses: []
40
+ metadata: {}
41
+ post_install_message:
42
+ rdoc_options: []
43
+ require_paths:
44
+ - lib
45
+ required_ruby_version: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ requirements: []
56
+ rubyforge_project:
57
+ rubygems_version: 2.4.4
58
+ signing_key:
59
+ specification_version: 4
60
+ summary: ''
61
+ test_files: []