import 'package:practice_engine/practice_engine.dart'; /// Default deck with 20 general knowledge questions for practice. class DefaultDeck { static Deck get deck { const config = DeckConfig( requiredConsecutiveCorrect: 3, defaultAttemptSize: 10, priorityIncreaseOnIncorrect: 5, priorityDecreaseOnCorrect: 2, immediateFeedbackEnabled: true, ); final questions = [ Question( id: 'gk_1', prompt: 'What is the capital city of Australia?', answers: ['Sydney', 'Melbourne', 'Canberra', 'Perth'], correctAnswerIndices: [2], ), Question( id: 'gk_2', prompt: 'Which planet is known as the Red Planet?', answers: ['Venus', 'Mars', 'Jupiter', 'Saturn'], correctAnswerIndices: [1], ), Question( id: 'gk_3', prompt: 'What is the largest ocean on Earth?', answers: ['Atlantic Ocean', 'Indian Ocean', 'Arctic Ocean', 'Pacific Ocean'], correctAnswerIndices: [3], ), Question( id: 'gk_4', prompt: 'Who wrote the novel "1984"?', answers: ['George Orwell', 'Aldous Huxley', 'Ray Bradbury', 'J.D. Salinger'], correctAnswerIndices: [0], ), Question( id: 'gk_5', prompt: 'What is the chemical symbol for gold?', answers: ['Go', 'Gd', 'Au', 'Ag'], correctAnswerIndices: [2], ), Question( id: 'gk_6', prompt: 'In which year did World War II end?', answers: ['1943', '1944', '1945', '1946'], correctAnswerIndices: [2], ), Question( id: 'gk_7', prompt: 'What is the smallest prime number?', answers: ['0', '1', '2', '3'], correctAnswerIndices: [2], ), Question( id: 'gk_8', prompt: 'Which gas makes up approximately 78% of Earth\'s atmosphere?', answers: ['Oxygen', 'Carbon Dioxide', 'Nitrogen', 'Argon'], correctAnswerIndices: [2], ), Question( id: 'gk_9', prompt: 'What is the longest river in the world?', answers: ['Amazon River', 'Nile River', 'Yangtze River', 'Mississippi River'], correctAnswerIndices: [1], ), Question( id: 'gk_10', prompt: 'Who painted the Mona Lisa?', answers: ['Vincent van Gogh', 'Pablo Picasso', 'Leonardo da Vinci', 'Michelangelo'], correctAnswerIndices: [2], ), Question( id: 'gk_11', prompt: 'What is the speed of light in a vacuum (approximately)?', answers: ['300,000 km/s', '150,000 km/s', '450,000 km/s', '600,000 km/s'], correctAnswerIndices: [0], ), Question( id: 'gk_12', prompt: 'Which country is home to the kangaroo?', answers: ['New Zealand', 'Australia', 'South Africa', 'Brazil'], correctAnswerIndices: [1], ), Question( id: 'gk_13', prompt: 'What is the hardest natural substance on Earth?', answers: ['Gold', 'Diamond', 'Platinum', 'Titanium'], correctAnswerIndices: [1], ), Question( id: 'gk_14', prompt: 'How many continents are there on Earth?', answers: ['5', '6', '7', '8'], correctAnswerIndices: [2], ), Question( id: 'gk_15', prompt: 'What is the largest mammal in the world?', answers: ['African Elephant', 'Blue Whale', 'Giraffe', 'Polar Bear'], correctAnswerIndices: [1], ), Question( id: 'gk_16', prompt: 'In which city is the Eiffel Tower located?', answers: ['London', 'Berlin', 'Paris', 'Rome'], correctAnswerIndices: [2], ), Question( id: 'gk_17', prompt: 'What is the square root of 64?', answers: ['6', '7', '8', '9'], correctAnswerIndices: [2], ), Question( id: 'gk_18', prompt: 'Which element has the atomic number 1?', answers: ['Helium', 'Hydrogen', 'Lithium', 'Carbon'], correctAnswerIndices: [1], ), Question( id: 'gk_19', prompt: 'What is the largest desert in the world?', answers: ['Gobi Desert', 'Sahara Desert', 'Antarctic Desert', 'Arabian Desert'], correctAnswerIndices: [2], ), Question( id: 'gk_20', prompt: 'Who invented the telephone?', answers: ['Thomas Edison', 'Alexander Graham Bell', 'Nikola Tesla', 'Guglielmo Marconi'], correctAnswerIndices: [1], ), ]; return Deck( id: 'default-general-knowledge', title: 'General Knowledge Quiz', description: 'A collection of 20 general knowledge questions covering science, geography, history, and more. Perfect for testing your knowledge!', questions: questions, config: config, ); } /// Default deck with mock attempt history and progress data static Deck get deckWithMockData { const config = DeckConfig( requiredConsecutiveCorrect: 3, defaultAttemptSize: 10, priorityIncreaseOnIncorrect: 5, priorityDecreaseOnCorrect: 2, immediateFeedbackEnabled: true, ); final now = DateTime.now(); // Create mock attempt history (4 previous attempts) // Unknown percentage decreases over time as more questions become known final attemptHistory = [ // First attempt - 6/10 correct (60%), ~85% unknown (17/20 questions) AttemptHistoryEntry( timestamp: now.subtract(const Duration(days: 7)).millisecondsSinceEpoch, totalQuestions: 10, correctCount: 6, percentageCorrect: 60.0, timeSpent: 245000, // milliseconds unknownPercentage: 85.0, // 17 out of 20 questions unknown ), // Second attempt - 7/10 correct (70%), ~70% unknown (14/20 questions) AttemptHistoryEntry( timestamp: now.subtract(const Duration(days: 5)).millisecondsSinceEpoch, totalQuestions: 10, correctCount: 7, percentageCorrect: 70.0, timeSpent: 198000, // milliseconds unknownPercentage: 70.0, // 14 out of 20 questions unknown ), // Third attempt - 8/10 correct (80%), ~55% unknown (11/20 questions) AttemptHistoryEntry( timestamp: now.subtract(const Duration(days: 3)).millisecondsSinceEpoch, totalQuestions: 10, correctCount: 8, percentageCorrect: 80.0, timeSpent: 187000, // milliseconds unknownPercentage: 55.0, // 11 out of 20 questions unknown ), // Fourth attempt - 9/10 correct (90%), ~45% unknown (9/20 questions) AttemptHistoryEntry( timestamp: now.subtract(const Duration(days: 1)).millisecondsSinceEpoch, totalQuestions: 10, correctCount: 9, percentageCorrect: 90.0, timeSpent: 165000, // milliseconds unknownPercentage: 45.0, // 9 out of 20 questions unknown ), ]; final questions = [ // Question 1 - Known (answered correctly 3+ times) Question( id: 'gk_1', prompt: 'What is the capital city of Australia?', answers: ['Sydney', 'Melbourne', 'Canberra', 'Perth'], correctAnswerIndices: [2], consecutiveCorrect: 3, isKnown: true, priorityPoints: 0, lastAttemptIndex: 3, totalCorrectAttempts: 4, totalAttempts: 4, ), // Question 2 - Known Question( id: 'gk_2', prompt: 'Which planet is known as the Red Planet?', answers: ['Venus', 'Mars', 'Jupiter', 'Saturn'], correctAnswerIndices: [1], consecutiveCorrect: 3, isKnown: true, priorityPoints: 0, lastAttemptIndex: 3, totalCorrectAttempts: 4, totalAttempts: 4, ), // Question 3 - Known Question( id: 'gk_3', prompt: 'What is the largest ocean on Earth?', answers: ['Atlantic Ocean', 'Indian Ocean', 'Arctic Ocean', 'Pacific Ocean'], correctAnswerIndices: [3], consecutiveCorrect: 3, isKnown: true, priorityPoints: 0, lastAttemptIndex: 3, totalCorrectAttempts: 4, totalAttempts: 4, ), // Question 4 - Known Question( id: 'gk_4', prompt: 'Who wrote the novel "1984"?', answers: ['George Orwell', 'Aldous Huxley', 'Ray Bradbury', 'J.D. Salinger'], correctAnswerIndices: [0], consecutiveCorrect: 3, isKnown: true, priorityPoints: 0, lastAttemptIndex: 3, totalCorrectAttempts: 4, totalAttempts: 4, ), // Question 5 - Known Question( id: 'gk_5', prompt: 'What is the chemical symbol for gold?', answers: ['Go', 'Gd', 'Au', 'Ag'], correctAnswerIndices: [2], consecutiveCorrect: 3, isKnown: true, priorityPoints: 0, lastAttemptIndex: 3, totalCorrectAttempts: 4, totalAttempts: 4, ), // Question 6 - Known Question( id: 'gk_6', prompt: 'In which year did World War II end?', answers: ['1943', '1944', '1945', '1946'], correctAnswerIndices: [2], consecutiveCorrect: 3, isKnown: true, priorityPoints: 0, lastAttemptIndex: 3, totalCorrectAttempts: 4, totalAttempts: 4, ), // Question 7 - Known Question( id: 'gk_7', prompt: 'What is the smallest prime number?', answers: ['0', '1', '2', '3'], correctAnswerIndices: [2], consecutiveCorrect: 3, isKnown: true, priorityPoints: 0, lastAttemptIndex: 3, totalCorrectAttempts: 4, totalAttempts: 4, ), // Question 8 - Known Question( id: 'gk_8', prompt: 'Which gas makes up approximately 78% of Earth\'s atmosphere?', answers: ['Oxygen', 'Carbon Dioxide', 'Nitrogen', 'Argon'], correctAnswerIndices: [2], consecutiveCorrect: 3, isKnown: true, priorityPoints: 0, lastAttemptIndex: 3, totalCorrectAttempts: 4, totalAttempts: 4, ), // Question 9 - Known Question( id: 'gk_9', prompt: 'What is the longest river in the world?', answers: ['Amazon River', 'Nile River', 'Yangtze River', 'Mississippi River'], correctAnswerIndices: [1], consecutiveCorrect: 3, isKnown: true, priorityPoints: 0, lastAttemptIndex: 3, totalCorrectAttempts: 4, totalAttempts: 4, ), // Question 10 - Known Question( id: 'gk_10', prompt: 'Who painted the Mona Lisa?', answers: ['Vincent van Gogh', 'Pablo Picasso', 'Leonardo da Vinci', 'Michelangelo'], correctAnswerIndices: [2], consecutiveCorrect: 3, isKnown: true, priorityPoints: 0, lastAttemptIndex: 3, totalCorrectAttempts: 4, totalAttempts: 4, ), // Question 11 - Known Question( id: 'gk_11', prompt: 'What is the speed of light in a vacuum (approximately)?', answers: ['300,000 km/s', '150,000 km/s', '450,000 km/s', '600,000 km/s'], correctAnswerIndices: [0], consecutiveCorrect: 3, isKnown: true, priorityPoints: 0, lastAttemptIndex: 3, totalCorrectAttempts: 4, totalAttempts: 4, ), // Question 12 - Known Question( id: 'gk_12', prompt: 'Which country is home to the kangaroo?', answers: ['New Zealand', 'Australia', 'South Africa', 'Brazil'], correctAnswerIndices: [1], consecutiveCorrect: 3, isKnown: true, priorityPoints: 0, lastAttemptIndex: 3, totalCorrectAttempts: 4, totalAttempts: 4, ), // Question 13 - Known Question( id: 'gk_13', prompt: 'What is the hardest natural substance on Earth?', answers: ['Gold', 'Diamond', 'Platinum', 'Titanium'], correctAnswerIndices: [1], consecutiveCorrect: 3, isKnown: true, priorityPoints: 0, lastAttemptIndex: 3, totalCorrectAttempts: 4, totalAttempts: 4, ), // Question 14 - Known Question( id: 'gk_14', prompt: 'How many continents are there on Earth?', answers: ['5', '6', '7', '8'], correctAnswerIndices: [2], consecutiveCorrect: 3, isKnown: true, priorityPoints: 0, lastAttemptIndex: 3, totalCorrectAttempts: 4, totalAttempts: 4, ), // Question 15 - Known Question( id: 'gk_15', prompt: 'What is the largest mammal in the world?', answers: ['African Elephant', 'Blue Whale', 'Giraffe', 'Polar Bear'], correctAnswerIndices: [1], consecutiveCorrect: 3, isKnown: true, priorityPoints: 0, lastAttemptIndex: 3, totalCorrectAttempts: 4, totalAttempts: 4, ), // Question 16 - Known Question( id: 'gk_16', prompt: 'In which city is the Eiffel Tower located?', answers: ['London', 'Berlin', 'Paris', 'Rome'], correctAnswerIndices: [2], consecutiveCorrect: 3, isKnown: true, priorityPoints: 0, lastAttemptIndex: 3, totalCorrectAttempts: 4, totalAttempts: 4, ), // Question 17 - Known Question( id: 'gk_17', prompt: 'What is the square root of 64?', answers: ['6', '7', '8', '9'], correctAnswerIndices: [2], consecutiveCorrect: 3, isKnown: true, priorityPoints: 0, lastAttemptIndex: 3, totalCorrectAttempts: 4, totalAttempts: 4, ), // Question 18 - Known Question( id: 'gk_18', prompt: 'Which element has the atomic number 1?', answers: ['Helium', 'Hydrogen', 'Lithium', 'Carbon'], correctAnswerIndices: [1], consecutiveCorrect: 3, isKnown: true, priorityPoints: 0, lastAttemptIndex: 3, totalCorrectAttempts: 4, totalAttempts: 4, ), // Question 19 - Known Question( id: 'gk_19', prompt: 'What is the largest desert in the world?', answers: ['Gobi Desert', 'Sahara Desert', 'Antarctic Desert', 'Arabian Desert'], correctAnswerIndices: [2], consecutiveCorrect: 3, isKnown: true, priorityPoints: 0, lastAttemptIndex: 3, totalCorrectAttempts: 4, totalAttempts: 4, ), // Question 20 - Not yet known (only one left!) Question( id: 'gk_20', prompt: 'Who invented the telephone?', answers: ['Thomas Edison', 'Alexander Graham Bell', 'Nikola Tesla', 'Guglielmo Marconi'], correctAnswerIndices: [1], consecutiveCorrect: 2, isKnown: false, priorityPoints: 0, lastAttemptIndex: 3, totalCorrectAttempts: 3, totalAttempts: 4, ), ]; return Deck( id: 'default-general-knowledge', title: 'General Knowledge Quiz', description: 'A collection of 20 general knowledge questions covering science, geography, history, and more. Perfect for testing your knowledge!', questions: questions, config: config, currentAttemptIndex: 4, // 4 attempts have been made attemptHistory: attemptHistory, ); } }