...
This commit is contained in:
@@ -3,20 +3,18 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:service_api/service_api.dart';
|
||||
|
||||
/// 카드에 들어갈 콘텐츠 타입
|
||||
enum CardContentType {
|
||||
emoji, // 기존: 똑같은 이모지 (🐰 ↔ 🐰)
|
||||
icon, // 기존: 똑같은 아이콘 (⭐️ ↔ ⭐️)
|
||||
number, // 기존: 똑같은 숫자 (1 ↔ 1)
|
||||
calculation, // [🔥 신규] 연산 (3+4 ↔ 7)
|
||||
pairWord, // [🔥 신규] 연상 단어 (토끼 ↔ 당근)
|
||||
emoji, // 🐰 ↔ 🐰
|
||||
icon, // ⭐️ ↔ ⭐️
|
||||
number, // 1 ↔ 1
|
||||
calculation, // 3+4 ↔ 7 (동적 생성)
|
||||
pairWord, // 토끼 ↔ 당근
|
||||
}
|
||||
|
||||
/// 개별 카드 상태 모델
|
||||
class CardItem {
|
||||
final int id; // 카드의 고유 식별자 (GridView 인덱스와 무관, 셔플됨)
|
||||
final String matchId; // [🔥 신규] 매칭 판단용 ID (이게 같으면 정답)
|
||||
final String displayContent; // [🔥 신규] 화면에 보여질 내용
|
||||
final int id;
|
||||
final String matchId;
|
||||
final String displayContent;
|
||||
|
||||
bool isFaceUp;
|
||||
bool isMatched;
|
||||
@@ -51,7 +49,7 @@ class CardFlipDifficulty extends GameDifficulty {
|
||||
}
|
||||
|
||||
class CardFlipDifficulties {
|
||||
// --- 콘텐츠 풀 ---
|
||||
// 이모지 풀
|
||||
static const List<String> emojis = [
|
||||
"🐶", "🐱", "🐭", "🐹", "🐰", "🦊", "🐻", "🐼", "🐨", "🐯",
|
||||
"🦁", "🐮", "🐷", "🐸", "🐵", "🐔", "🐧", "🐦", "🐤", "🦆",
|
||||
@@ -59,14 +57,9 @@ class CardFlipDifficulties {
|
||||
"⚽", "🏀", "🏈", "⚾", "🎾", "🏐", "🏉", "🎱", "🏓", "🏸"
|
||||
];
|
||||
|
||||
// [🔥 신규] 연산 문제 풀 (질문 : 정답)
|
||||
static const Map<String, String> calculationPairs = {
|
||||
"2 + 3": "5", "5 + 5": "10", "7 - 2": "5", "3 x 3": "9", "10 - 4": "6",
|
||||
"6 + 6": "12", "8 + 1": "9", "4 x 2": "8", "15 - 5": "10", "20 / 2": "10",
|
||||
"1 + 1": "2", "9 - 3": "6", "2 x 5": "10", "8 / 2": "4", "3 + 7": "10"
|
||||
};
|
||||
// ❌ [삭제됨] calculationPairs (컨트롤러에서 동적 생성하므로 제거)
|
||||
|
||||
// [🔥 신규] 연상 단어 풀 (A : B)
|
||||
// 연상 단어 풀 (A : B)
|
||||
static const Map<String, String> wordPairs = {
|
||||
"토끼": "당근", "원숭이": "바나나", "한국": "서울", "미국": "워싱턴",
|
||||
"해": "달", "여름": "겨울", "남자": "여자", "학교": "학생",
|
||||
@@ -74,7 +67,7 @@ class CardFlipDifficulties {
|
||||
"봄": "꽃", "가을": "단풍", "숟가락": "젓가락"
|
||||
};
|
||||
|
||||
// --- 난이도 목록 (15단계) ---
|
||||
// 난이도 목록 (15단계)
|
||||
static final List<CardFlipDifficulty> allDifficulties = [
|
||||
// Phase 1: 입문 (동일 매칭)
|
||||
const CardFlipDifficulty(levelIndex: 1, name: 'Lv. 1: 입문 (이모지 12)', contextId: 'FLIP_L1_EMOJI', rows: 4, cols: 3, timeLimitSeconds: 40, contentType: CardContentType.emoji),
|
||||
@@ -100,6 +93,8 @@ class CardFlipDifficulties {
|
||||
const CardFlipDifficulty(levelIndex: 13, name: 'Lv. 13: 갓모드 (30장)', contextId: 'FLIP_L13_6x5', rows: 6, cols: 5, timeLimitSeconds: 130, contentType: CardContentType.emoji),
|
||||
const CardFlipDifficulty(levelIndex: 14, name: 'Lv. 14: 타임어택 (연산)', contextId: 'FLIP_L14_6x5_CALC', rows: 6, cols: 5, timeLimitSeconds: 120, contentType: CardContentType.calculation),
|
||||
const CardFlipDifficulty(levelIndex: 15, name: 'Lv. 15: 엔드게임 (연상)', contextId: 'FLIP_L15_6x5_PAIR', rows: 6, cols: 5, timeLimitSeconds: 120, contentType: CardContentType.pairWord),
|
||||
|
||||
const CardFlipDifficulty(levelIndex: 16, name: 'Lv. 15: 헬 (연상)', contextId: 'FLIP_L16_6x6_PAIR', rows: 6, cols: 6, timeLimitSeconds: 120, contentType: CardContentType.pairWord),
|
||||
];
|
||||
|
||||
static CardFlipDifficulty getLevel(int levelIndex) {
|
||||
|
||||
Reference in New Issue
Block a user