Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
01ece78
set css for the App.js
mhosseinsafi Oct 17, 2023
7bc6bef
add new font
mhosseinsafi Oct 17, 2023
2e7e0f3
add fake data to json file
mhosseinsafi Oct 17, 2023
d8f6eb5
edit .css import in index.js
mhosseinsafi Oct 17, 2023
93fa1c8
initial homepage
mhosseinsafi Oct 17, 2023
f3a3fde
add package-lock.json
mhosseinsafi Oct 17, 2023
8c70346
add QuizJs logo
mhosseinsafi Oct 17, 2023
fef7c81
add QuizJs logo to homepage
mhosseinsafi Oct 17, 2023
3f18a7b
add new Logo
mhosseinsafi Oct 17, 2023
e64b8f8
add path for the Logo
mhosseinsafi Oct 17, 2023
954348f
create components
mhosseinsafi Oct 17, 2023
6112bf1
move function to home.js component
mhosseinsafi Oct 17, 2023
454271d
change the path for the image
mhosseinsafi Oct 17, 2023
f762f1b
schema file made seeds started
ryanstew95 Oct 18, 2023
b51a45b
npm install router dom
mhosseinsafi Oct 18, 2023
bb3c244
add routes
mhosseinsafi Oct 18, 2023
5f7d0fb
add navigation to instruction page
mhosseinsafi Oct 18, 2023
8771bda
add image-css file-back navigation
mhosseinsafi Oct 18, 2023
028feb9
writing outline for questions for round one
ryanstew95 Oct 18, 2023
f5943f6
merge master to my database branch
ryanstew95 Oct 18, 2023
afbd036
Merge pull request #1 from ryanstew95/home_page
mhosseinsafi Oct 18, 2023
131d20c
working on round two questions
ryanstew95 Oct 18, 2023
26e1825
merge with master
ryanstew95 Oct 18, 2023
2c9efe2
working on questions for round two
ryanstew95 Oct 18, 2023
593686e
finished outline for questions
ryanstew95 Oct 18, 2023
8134636
started seeds for question table
ryanstew95 Oct 18, 2023
1b85ea5
editing questions
ryanstew95 Oct 19, 2023
6141fa5
add testing-library package, add tests for leaderboards
nickstilwell52 Oct 19, 2023
9b29130
finishing up questions outline
ryanstew95 Oct 19, 2023
812221b
ready to work on seed02 file
ryanstew95 Oct 19, 2023
336f05b
added how to play to instruction page
ryanstew95 Oct 20, 2023
b23a3fc
database made and connected
ryanstew95 Oct 20, 2023
9394575
made backend route to test if the db connection worked
ryanstew95 Oct 20, 2023
a9c305e
api for game table done
ryanstew95 Oct 20, 2023
c04efec
replace hard coded leaderbaord with scores from the db
ryanstew95 Oct 20, 2023
dbe3ed5
ordered the scores from highest to lowest
ryanstew95 Oct 20, 2023
defa3e3
deleted consolelog for debugging and imports that was not being used
ryanstew95 Oct 20, 2023
6ed16ee
Merge pull request #2 from ryanstew95/tests/leaderboard
nickstilwell52 Oct 20, 2023
97784ba
merge
ryanstew95 Oct 20, 2023
5c44976
Merge pull request #3 from ryanstew95/back-end
ryanstew95 Oct 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions express-back-end/db/01_seeds.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
INSERT INTO Game (NickName, Score, Lives, StartDateTime) VALUES
('PlayerOne', 120, 1, '2023-10-12 08:00:00'),
('GamerGirl', 110, 1, '2023-10-12 09:30:00'),
('QuizMaster', 150, 2, '2023-10-12 10:45:00'),
('TriviaBuff', 110, 1, '2023-10-12 12:15:00'),
('CreativeBro', 300, 5, '2023-10-12 13:30:00'),
('PuzzlePro', 110, 1, '2023-10-12 15:00:00'),
('RiddleSolver', 180, 2, '2023-10-12 16:15:00'),
('SmartyPants', 110, 1, '2023-10-12 17:45:00'),
('WiseOwl', 160, 2, '2023-10-12 19:00:00'),
('GeniusGeek', 110, 1, '2023-10-12 20:30:00'),
('QuickThinker', 140, 2, '2023-10-12 21:45:00'),
('SmartiePie', 110, 1, '2023-10-12 23:15:00'),
('CleverClog', 220, 5, '2023-10-13 08:30:00'),
('MindMaze', 120, 3, '2023-10-13 10:00:00'),
('IntellectRuler', 190, 3, '2023-10-13 11:15:00'),
('KnowledgeKnight', 110, 1, '2023-10-13 12:45:00'),
('SharpMind', 170, 2, '2023-10-13 14:00:00'),
('BrainyBee', 110, 1, '2023-10-13 15:30:00'),
('SavvySphinx', 130, 1, '2023-10-13 16:45:00'),
('WittyWhiz', 300, 5, '2023-10-13 18:15:00');
84 changes: 84 additions & 0 deletions express-back-end/db/02_seeds.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
INSERT INTO Question (GameID, Question, RoundNumber, Hint, OptionA, OptionB, OptionC, OptionD, Correct_Option, Created_At)
VALUES
(1, 'What is the square root of a fish?', 1, 'Fish come in many shapes and sizes, but they are known for something specific.', '2', 'Fish', '42', '√(-1)', 'B', NOW()),
(1, 'If you have 3 apples and you take away 2, how many apples do you have left?', 1, 'This question plays with the concept of ownership.', '0', '1', '2', '3', 'B', NOW()),
(1, 'What has keys but can''t open locks?', 1, 'This item is often found in homes and offices.', 'A door', 'Keyboard', 'Typewriter', 'Piano', 'D', NOW()),
(1, 'Which is the odd one out?', 1, 'Consider the category or common characteristics of the items.', 'Apple', 'Banana', 'Orange', 'Grape', 'C', NOW()),
(1, 'How many sides does a circle have?', 1, 'Think geometrically, but don''t focus on straight lines.', '0', '1', '2', 'Infinite', 'B', NOW()),
(1, 'If a plane crashes on the border between the U.S. and Canada, where do you bury the survivors?', 1, 'This is a tricky question involving the geography of a crash.', 'In the U.S.', 'In Canada', 'Nowhere, survivors are alive', 'In an international cemetery', 'C', NOW()),
(1, 'What gets wetter as it dries?', 1, 'It''s related to an everyday item and the action it performs.', 'Towel', 'Sponge', 'Soap', 'Raincoat', 'A', NOW()),
(1, 'Which planet is known as the "Red Planet"?', 1, 'Look to the skies and identify the planet with a distinct color.', 'Venus', 'Jupiter', 'Mars', 'Saturn', 'C', NOW()),
(1, 'What comes once in a minute, twice in a moment, but never in a thousand years?', 1, 'This one is about time and a specific letter''s occurrence.', 'The letter "M"', 'The letter "E"', 'The letter "O"', 'The letter "N"', 'A', NOW()),
(1, 'If a rooster lays an egg on a triangular roof, which way does the egg roll?', 1, 'Focus on the unique situation described and its implications.', 'Left', 'Right', 'It doesn''t roll, roosters don''t lay eggs', 'Down', 'C', NOW()),
(1, 'How can a man go eight days without sleep?', 1, 'It''s not about sleeping patterns but a clever trick with days.', 'He sleeps at night', 'He takes power naps', 'He sleeps during the day', 'He only sleeps at night', 'D', NOW()),
(1, 'What has an endless supply of letters but starts empty?', 1, 'It''s not about paper or mail but a fundamental concept.', 'Mailbox', 'Alphabet', 'Post Office', 'Mailman', 'B', NOW()),
(1, 'What has a heart that doesn''t beat?', 1, 'It''s not a living thing but is often found on walls.', 'Clock', 'Person', 'Deer', 'Artichoke', 'D', NOW()),
(1, 'What has a neck but no head?', 1, 'Think about a container with a long neck.', 'Giraffe', 'Turtle Neck Sweater', 'Shirt', 'Bottle', 'D', NOW()),
(1, 'What is as light as a feather yet the strongest person can''t hold it for more than a few minutes?', 1, 'It''s not tangible but involves a momentary experience.', 'Air', 'Breath', 'Laughter', 'Hope', 'B', NOW()),
(1, 'What is full of holes but still holds water?', 1, 'It''s not a physical object but something you might use in the kitchen.', 'Sponge', 'Net', 'Strainer', 'Cloud', 'A', NOW()),
(1, 'What has a face and two hands but no arms or legs?', 1, 'You look at it daily to know the time.', 'Clock', 'Mirror', 'Sun', 'Compass', 'A', NOW()),
(1, 'What has a head, a tail, is brown, and has no legs?', 1, 'It''s often found outdoors.', 'Snake', 'Stick', 'Cigar', 'Worm', 'D', NOW()),
(1, 'What has one eye but can''t see?', 1, 'It''s a tool for crafting.', 'Cyclops', 'Needle', 'Camera', 'Telescope', 'B', NOW()),
(1, 'The more you take, the more you leave behind. What am I?', 1, 'It''s about your journey and interactions.', 'Footsteps', 'Breath', 'Mist', 'Echo', 'A', NOW()),
(1, 'What belongs to you but is used more by others?', 1, 'It''s a resource you invest and spend.', 'Your name', 'Your car', 'Your time', 'Your money', 'A', NOW()),
(1, 'I speak without a mouth and hear without ears. I have no body, but I come alive with the wind. What am I?', 1, 'It''s about the invisible impact of nature.', 'Echo', 'Music', 'Whisper', 'Thunder', 'A', NOW()),
(1, 'I am taken from a mine, and shut up in a wooden case, from which I am never released, and yet I am used by almost every person. What am I?', 1, 'You draw with it.', 'Gold', 'Diamond', 'Pencil lead', 'Coal', 'C', NOW()),
(1, 'What can be cracked, made, told, and played?', 1, 'You find me in a house.', 'Joke', 'Code', 'Egg', 'Record', 'A', NOW()),
(1, 'I am always hungry. I must always be fed. The finger I lick will soon turn red. What am I?', 1, 'More I am fed the bigger I get.', 'Dog', 'Fire', 'Cat', 'Baby', 'B', NOW()),
(1, 'What can travel around the world while staying in a corner?', 1, 'People collect me.', 'The flu', 'Earth', 'A stamp', 'Satellite', 'C', NOW()),
(1, 'If a cat is black and a cat is white, what kind of cat doesn''t exist?', 1, 'It''s a play on colors.', 'Gray cat', 'Invisible cat', 'Rainbow cat', 'Striped cat', 'A', NOW()),
(1, 'What has cities but no houses, forests but no trees, and rivers but no water?', 1, 'It''s a representation.', 'Map', 'Book', 'Globe', 'Dictionary', 'A', NOW()),
(1, 'What is always in front of you but can''t be seen?', 1, 'It''s a moment in time.', 'Future', 'Past', 'Present', 'Memory', 'A', NOW()),
(1, 'What has teeth but can''t bite?', 1, 'It''s used in clothing.', 'Zipper', 'Comb', 'Saw', 'Key', 'A', NOW()),
(1, 'What can run but never walks, has a mouth but never talks?', 1, 'It helps you keep time.', 'Wind', 'River', 'Clock', 'Fire', 'C', NOW()),
(1, 'What is the absolute last thing both men and women take off before getting into bed?', 1, 'Think literally', 'Hat', 'Shoes', 'Socks', 'Their feet off the floor', 'D', NOW());
INSERT INTO Question (GameID, Question, RoundNumber, Hint, OptionA, OptionB, OptionC, OptionD, Correct_Option, Created_At)
VALUES
(1, 'What do you call a group of wolves?', 2, 'Think about their behavior', 'A herd', 'A school', 'A pack', 'A flock', 'C', NOW()),
(1, 'The marker does not want it, the buyer does not use it, and the user does not see it.', 2, 'Think about the context and purpose of the item mentioned.', 'Coffin', 'Notebook', 'Pen', 'Desk', 'A', NOW()),
(1, 'What gas do plants absorb from the air?', 2, 'As essential gas.', 'Carbon Dioxide', 'Oxygen', 'Nitrogen', 'Helium', 'A', NOW()),
(1, 'What''s 2 + 2?', 2, 'Simple addition.', '4', '3', '5', '6', 'A', NOW()),
(1, 'Break it and it is better, immediately set, and harder to break again. What am I?', 2, 'Consider the context of something breaking and becoming better.', 'Glass', 'Bone', 'A record', 'Mirror', 'C', NOW()),
(1, 'What''s the chemical symbol for water?', 2, 'Two parts hydrogen one part oxygen', 'CH4', 'O2', 'CO2', 'H2O', 'D', NOW()),
(1, 'What''s the largest planet in our solar system?', 2, 'Think about the planets'' sizes.', 'Mars', 'Earth', 'Jupiter', 'Saturn', 'C', NOW()),
(1, 'What''s the smallest even prime number?', 2, 'A unique characteristic.', '2', '1', '3', '4', 'A', NOW()),
(1, 'What is 147 apples plus 68 oranges?', 2, 'Consider the composition of the question and its straightforwardness.', 'A lot of fruit', '215 fruits', '147 apples and 68 oranges', 'Fruit salad', 'C', NOW()),
(1, 'If you give me food I will grow. If you give me water I will die. Who or what am I?', 2, 'Think about elements that need food to sustain and grow, and those that perish when exposed to water.', 'Plant', 'Animal', 'Rock', 'Fire', 'D', NOW()),
(1, 'What''s the chemical symbol for oxygen?', 2, 'An essential gas.', 'H2O', 'O2', 'CO2', 'O', 'B', NOW()),
(1, 'The more you have of it, the less you see. What is it?', 2, 'Think about a condition where the absence of something allows another to become more apparent.', 'Light', 'Vision', 'Darkness', 'Knowledge', 'C', NOW()),
(1, 'How many planets are there in our solar system?', 2, 'Include Pluto if you must.', '7', '9', '10', '8', 'D', NOW()),
(1, 'What is so fragile that when you say its name you break it?', 2, 'Consider the impact of sound on a particular concept.', 'Mirror', 'Glass', 'Feather', 'Silence', 'D', NOW()),
(1, 'How many sides does a hexagon have?', 2, 'It''s in the name.', '5', '7', '6', '8', 'C', NOW()),
(1, 'Who wrote "Romeo and Juliet"?', 2, 'Classic playwright.', 'William Shakespeare', 'Charles Dickens', 'Jane Austen', 'Mark Twain', 'A', NOW()),
(1, 'How many years are in a decade?', 2, 'A portion of a century.', '5', '20', '10', '100', 'C', NOW()),
(1, 'What''s the opposite of "empty"?', 2, 'Think about containers.', 'Half', 'Full', 'Light', 'Dense', 'B', NOW()),
(1, 'How many sides does a triangle have?', 2, 'Classic geometry.', '4', '3', '5', '6', 'B', NOW()),
(1, 'What is the square root of 16?', 2, 'A perfect square.', '4', '8', '2', '64', 'A', NOW()),
(1, 'What orchestral device is not blown, bowed, plucked or struck?', 2, 'Think about who directs the performance without directly interacting with the instruments.', 'The conductor''s baton', 'Triangle', 'Cello', 'Trombone', 'A', NOW());
INSERT INTO Question (GameID, Question, RoundNumber, Hint, OptionA, OptionB, OptionC, OptionD, Correct_Option, Created_At)
VALUES
(1, 'What is the meaning of life, the universe, and everything?', 3, 'The answer is as elusive as the question.', '42', 'Infinite possibilities', 'Love', 'A mystery', 'D', NOW()),
(1, 'July 4th is the day that Americans celebrate "Independence Day." Do the British have a fourth of July in England?', 3, 'Think about the literal interpretation of the question', 'Yes, they do but it''s on the first', 'Of course, they do', 'Yes, but it''s called "Dependence Day"', 'Yes, and it''s a celebration of American independence', 'B', NOW()),
(1, 'Which would be worth more, a pound of $10 pure gold coins of half a pound of $20 pure gold coins, or would they be worth the same amount?', 3, 'Think about the market value of gold', 'A pound of gold is always worth more than a half pound of gold', 'A pound of $10 pure gold coins', 'A half pound of $20 pure gold coins', 'Both would be worth the same amount', 'C', NOW()),
(1, 'Who is Schrödinger''s cat?', 3, 'It''s both alive and not alive, depending on your perspective.', 'A real cat', 'A thought experiment', 'A scientist''s pet', 'A cat with nine lives', 'B', NOW()),
(1, 'Even if they were starving, first peoples living in the Arctic never ate penguin eggs. Why not?', 3, 'The answer lies in the geographical distribution of penguins.', 'They do not like penguin eggs', 'They make you sick', 'There are not any penguins in the Arctic', 'Hard to find', 'C', NOW()),
(1, 'Four men were in a boat on a lake. The boat capsized and all four men sank and to the bottom of the lake, yet not a single man got wet! Why?', 3, 'Think about the wording of single man', 'They all got wet not just one single man', 'Because they were wearing scuba gear', 'They were still in the boat', 'Because they were all married', 'D', NOW()),
(1, 'If you divide thirty by half and add ten, what is the answer?', 3, 'When dividing by fractions, you must invert and multiply.', '70', '12', '25', '60', 'A', NOW()),
(1, 'Forward I am heavy, backward I am not. What am I?', 3, 'Play on words', 'Weight', 'Light', 'The word ton', 'Gravity', 'C', NOW()),
(1, 'How many squares on a chessboard?', 3, 'Add all squares including one of the whole board', '64 single squares', 'total of 204 square', '36 square made of 9 single squares', '9 squares made of 36 single squares', 'B', NOW()),
(1, 'How many 3-cent stamps are in a dozen?', 3, 'Think about how many stamps not the amount it cost', '4', '3', '12', '36', 'C', NOW()),
(1, 'How many cubic meters of dirt are in a hole 6 meters long, 2 meters wide, and 1 meter deep?', 3, 'Think about the nature of a hole and what it represents in terms of space and volume.', '9 meters', '1', '2', 'None', 'D', NOW()),
(1, 'In the following series, which numbers can be evenly divided by two? 1 2 3 4 5 6 7 8 9', 3, 'What type of numbers can be cut in half.', 'All even numbers', 'All of them', 'All odd numbers', 'None of them', 'B', NOW()),
(1, 'I have a foot on each end, and one in the middle. What am I?', 3, 'Consider objects that have a measurement component and are associated with length.', 'A yard stick', 'A ruler', 'A person', 'A ladder', 'A', NOW()),
(1, 'What is the mathematical concept behind the game of Sudoku?', 3, 'No Latin was harmed in the making of this concept.', 'Set theory', 'Group theory', 'Latin squares', 'Probability', 'C', NOW()),
(1, 'Which one of the three would see most clearly in total darkness? A leopard, a bat, or an owl?', 3, 'When it''s pitch black, all eyes are in the same boat.', 'leopard', 'bat', 'None', 'owl', 'C', NOW()),
(1, 'How can half of 12 be 7?', 3, 'Explore the world of numerals.', 'Upper half of the Roman numeral for 12 looks like the number for seven', 'If you add 5 to half of 12, you get 7', 'In a special numbering system, half of 12 is indeed 7', 'It''s a mathematical illusion, half of 12 is not really 7', 'A', NOW()),
(1, 'Mr. and Mrs. Clatter have five perfectly healthy children. Half of them are boys. How is that possible?', 3, 'Consider the information given carefully and think about the total number of children.', 'The family has a mix of boys and girls, but only half are mentioned', 'They adopted some of the children', 'Mrs. Clatter has a twin sister who also has children', 'The other half are also boys', 'D', NOW()),
(1, 'If you were to step into a sealed room filled with 100% methane gas and strike a match, what would happen?', 3, 'Think about what fire needs to exist and how it interacts with different environments.', 'It would explode', 'The match would burn briefly and then extinguish', 'To the match and the room nothing, the match cannot spark without oxygen', 'The room would catch fire but not explode', 'C', NOW()),
(1, 'Therein lies the secret. For you see, there is a seven-letter word in the English language that contains eight words without rearranging any of its letters. What is the word?', 3, 'Pay attention to the wording of the question', 'Wordplay', 'Puzzled', 'Therein', 'Mystery', 'C', NOW()),
(1, 'How can you physically stand behind your father while he is standing behind you?', 3, 'Think about spatial relationships and ways people can be positioned relative to each other.', 'Mirror', 'back to back', 'Hologram', 'Shadow', 'B', NOW()),
(1, 'How many mistakes can you find in the following sentence? This sentence contains four mistakes.', 3, 'One of the mistakes is the claim made in the sentence', 'Three', 'One', 'Four', 'Two', 'A', NOW()),
(1, 'What five-letter word becomes shorter when you add two letters to it?', 3, 'It''s a play on words and the nature of the word itself.', 'Brief', 'Short', 'Snappy', 'Little', 'B', NOW()),
(1, 'If you were to take two cucumbers from three cucumbers, how many would you have?', 3, 'Think about the action mentioned in the question.', 'One', 'Five', 'Two', 'Three', 'C', NOW()),
(1, 'Professor Quantum has two coins that total 30 cents. Since one of the coins is not a nickel what are the two coins?', 3, 'Read the question very carefully.', 'Two dimes', 'Two fifteen cent coins', 'A quarter and a nickel', 'Quarter and half a dime', 'C', NOW()),
(1, 'Many people consider it amazing, and just their luck, that things are always in the last place you look for them. What is wrong with this belief?', 3, 'Consider the logic of the statement.', 'It''s a universal truth', 'Once you find something, you don''t look elsewhere', 'It''s a statistical anomaly', 'It''s a self-fulfilling prophecy', 'B', NOW());
Loading