GAMES = {
    "1.1": [
        {"type": "puzzle", "title": "Plant Puzzle", "image": "plant", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["LIGHT", "WATER", "AIR", "SOIL", "FOOD", "SPACE"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "LIGHT", "hint": "Plants need this to make food"},
            {"answer": "WATER", "hint": "Plants need this to stay alive"},
            {"answer": "NUTRIENT", "hint": "Parts of soil plants need"},
            {"answer": "TEMPERATURE", "hint": "Affects how plants grow"},
        ], "points": 15},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["light", "water", "air", "nutrients", "living", "space"], "sentences": [
            {"text": "Plants are ___ things.", "answer": "living"},
            {"text": "Plants need ___ to make food.", "answer": "light"},
            {"text": "Roots take in ___ from the soil.", "answer": "nutrients"},
            {"text": "Every plant needs ___ to live in.", "answer": "space"},
        ], "points": 15},
    ],
    "1.2": [
        {"type": "puzzle", "title": "Roots & Stems Puzzle", "image": "roots", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["ROOT", "STEM", "TRUNK", "BARK", "WATER", "CARROT"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "ROOT", "hint": "Grows underground"},
            {"answer": "TRUNK", "hint": "Thick stem of a tree"},
            {"answer": "BARK", "hint": "Outside covering of trunk"},
            {"answer": "STEM", "hint": "Holds the plant up"},
        ], "points": 15},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["root", "stem", "trunk", "bark", "underground", "water"], "sentences": [
            {"text": "The ___ grows underground.", "answer": "root"},
            {"text": "The thick stem of a tree is the ___.", "answer": "trunk"},
            {"text": "The outside covering of the trunk is ___.", "answer": "bark"},
            {"text": "Roots take in ___ from the soil.", "answer": "water"},
        ], "points": 15},
    ],
    "1.3": [
        {"type": "puzzle", "title": "Leaves & Flowers Puzzle", "image": "leaves", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["LEAF", "FLOWER", "SEED", "FOOD", "SUNLIGHT", "AIR"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "LEAF", "hint": "Takes in sunlight and air"},
            {"answer": "FLOWER", "hint": "Makes seeds"},
            {"answer": "SEED", "hint": "Grows into a new plant"},
            {"answer": "FOOD", "hint": "Leaves use light to make this"},
        ], "points": 15},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["leaves", "flower", "seed", "food", "sunlight", "air"], "sentences": [
            {"text": "___ take in sunlight and air.", "answer": "leaves"},
            {"text": "The ___ makes seeds.", "answer": "flower"},
            {"text": "A ___ can grow into a new plant.", "answer": "seed"},
            {"text": "Leaves use light and air to make ___.", "answer": "food"},
        ], "points": 15},
    ],
    "1.4": [
        {"type": "puzzle", "title": "Life Cycle Puzzle", "image": "life_cycle", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["SEED", "SPROUT", "SEEDLING", "ADULT", "GERMINATE", "WIND"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "SEED", "hint": "Starts the life cycle"},
            {"answer": "SEEDLING", "hint": "Young plant with roots and leaves"},
            {"answer": "GERMINATE", "hint": "When a seed starts to grow"},
            {"answer": "FLOWER", "hint": "Adult plants make these"},
        ], "points": 15},
        {"type": "sequence", "title": "Life Cycle Order", "items": ["Seed", "Germination", "Seedling", "Adult Plant", "Flowers & Seeds"], "points": 20},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["seed", "seedling", "germinate", "flower", "wind", "water"], "sentences": [
            {"text": "Most plants begin life as a ___.", "answer": "seed"},
            {"text": "When a seed starts to grow, it will ___.", "answer": "germinate"},
            {"text": "A young plant is called a ___.", "answer": "seedling"},
            {"text": "Dandelion seeds travel by ___.", "answer": "wind"},
        ], "points": 15},
    ],
    "2.1": [
        {"type": "puzzle", "title": "Senses Puzzle", "image": "eyes", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["EYES", "NOSE", "EARS", "TONGUE", "SKIN", "SMELL"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "TONGUE", "hint": "Used for tasting"},
            {"answer": "THERMOMETER", "hint": "Measures temperature"},
            {"answer": "TELESCOPE", "hint": "Sees faraway objects"},
            {"answer": "OBSERVE", "hint": "Using senses to learn"},
        ], "points": 15},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["eyes", "nose", "ears", "tongue", "skin", "sight"], "sentences": [
            {"text": "You use your ___ to see.", "answer": "eyes"},
            {"text": "You use your ___ to smell.", "answer": "nose"},
            {"text": "You use your ___ to taste.", "answer": "tongue"},
            {"text": "You use your ___ to touch.", "answer": "skin"},
        ], "points": 15},
    ],
    "2.2": [
        {"type": "puzzle", "title": "Body Parts Puzzle", "image": "heart", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["BONE", "MUSCLE", "LUNG", "HEART", "BRAIN", "BLOOD"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "HEART", "hint": "Pumps blood"},
            {"answer": "BRAIN", "hint": "Used for thinking"},
            {"answer": "MUSCLE", "hint": "Allows movement"},
            {"answer": "LUNGS", "hint": "Help you breathe"},
        ], "points": 15},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["bones", "muscles", "lungs", "heart", "brain", "blood"], "sentences": [
            {"text": "___ hold up your body.", "answer": "bones"},
            {"text": "The ___ pumps blood.", "answer": "heart"},
            {"text": "You breathe with your ___.", "answer": "lungs"},
            {"text": "The ___ is used to think.", "answer": "brain"},
        ], "points": 15},
    ],
    "2.3": [
        {"type": "puzzle", "title": "Growing Up Puzzle", "image": "toddler", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["INFANT", "TODDLER", "TEEN", "ADULT", "ELDER", "GROW"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "INFANT", "hint": "A newborn baby"},
            {"answer": "TODDLER", "hint": "Learns to walk and talk"},
            {"answer": "ELDER", "hint": "May have gray hair"},
        ], "points": 15},
        {"type": "sequence", "title": "Life Stages Order", "items": ["Infant", "Toddler", "Teen", "Adult", "Elder Adult"], "points": 20},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["infant", "toddler", "teen", "adult", "elder", "gray"], "sentences": [
            {"text": "A newborn baby is an ___.", "answer": "infant"},
            {"text": "A 15-year-old is a ___.", "answer": "teen"},
            {"text": "Elder adults may have ___ hair.", "answer": "gray"},
            {"text": "An ___ can have wrinkled skin.", "answer": "elder"},
        ], "points": 15},
    ],
    "3.1": [
        {"type": "puzzle", "title": "Solids Puzzle", "image": "solid", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["SOLID", "MATTER", "LENGTH", "RULER", "MASS", "GRAM"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "SOLID", "hint": "Has its own shape and size"},
            {"answer": "BALANCE", "hint": "Measures mass"},
            {"answer": "CENTIMETER", "hint": "Unit of length"},
            {"answer": "MATTER", "hint": "Everything is made of this"},
        ], "points": 15},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["solid", "matter", "length", "ruler", "mass", "balance"], "sentences": [
            {"text": "A ___ has its own shape and size.", "answer": "solid"},
            {"text": "All things are made of ___.", "answer": "matter"},
            {"text": "A ___ measures length.", "answer": "ruler"},
            {"text": "A balance measures ___.", "answer": "mass"},
        ], "points": 15},
    ],
    "3.2": [
        {"type": "puzzle", "title": "Liquids Puzzle", "image": "liquid", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["LIQUID", "VOLUME", "SHAPE", "LITER", "WATER", "FLOW"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "LIQUID", "hint": "Takes the shape of its container"},
            {"answer": "VOLUME", "hint": "Amount of space something takes up"},
            {"answer": "MILLILITER", "hint": "Unit of volume"},
        ], "points": 15},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["liquid", "volume", "shape", "container", "liter", "flow"], "sentences": [
            {"text": "A ___ takes the shape of its container.", "answer": "liquid"},
            {"text": "The space something takes up is its ___.", "answer": "volume"},
            {"text": "Volume is measured in ___.", "answer": "liter"},
        ], "points": 15},
    ],
    "3.3": [
        {"type": "puzzle", "title": "Gases Puzzle", "image": "gas", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["GAS", "AIR", "TEMPERATURE", "WARM", "COOL", "CELSIUS"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "GAS", "hint": "Spreads to fill its container"},
            {"answer": "THERMOMETER", "hint": "Measures temperature"},
            {"answer": "CELSIUS", "hint": "Temperature scale"},
        ], "points": 15},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["gas", "air", "temperature", "thermometer", "warm", "container"], "sentences": [
            {"text": "A ___ fills all the space in its container.", "answer": "gas"},
            {"text": "Air is made up of ___.", "answer": "gas"},
            {"text": "A ___ measures temperature.", "answer": "thermometer"},
        ], "points": 15},
    ],
    "4.1": [
        {"type": "puzzle", "title": "Motion Puzzle", "image": "motion", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["MOVE", "SPIN", "SPEED", "STRAIGHT", "ZIGZAG", "FAST"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "SPIN", "hint": "Round and round movement"},
            {"answer": "ZIGZAG", "hint": "Z-shaped path"},
            {"answer": "SPEED", "hint": "How fast or slow something moves"},
        ], "points": 15},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["straight", "spin", "speed", "fast", "slow", "position"], "sentences": [
            {"text": "A train moves in a ___ line.", "answer": "straight"},
            {"text": "Round and round movement is a ___.", "answer": "spin"},
            {"text": "How fast or slow is your ___.", "answer": "speed"},
        ], "points": 15},
    ],
    "4.2": [
        {"type": "puzzle", "title": "Push & Pull Puzzle", "image": "push", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["PUSH", "PULL", "FORCE", "GRAVITY", "GROUND", "WIND"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "PUSH", "hint": "Moves something away from you"},
            {"answer": "PULL", "hint": "Moves something closer to you"},
            {"answer": "GRAVITY", "hint": "Pulls objects toward the ground"},
            {"answer": "FORCE", "hint": "A push or a pull"},
        ], "points": 15},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["push", "pull", "force", "gravity", "ground", "wind"], "sentences": [
            {"text": "A ___ moves something away from you.", "answer": "push"},
            {"text": "A ___ moves something closer to you.", "answer": "pull"},
            {"text": "___ pulls objects toward the ground.", "answer": "gravity"},
            {"text": "A push or pull is a ___.", "answer": "force"},
        ], "points": 15},
    ],
    "4.3": [
        {"type": "puzzle", "title": "Magnet Puzzle", "image": "magnet", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["MAGNET", "ATTRACT", "REPEL", "POLE", "STEEL", "IRON"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "MAGNET", "hint": "Attracts steel and iron"},
            {"answer": "ATTRACT", "hint": "Pull together"},
            {"answer": "REPEL", "hint": "Push apart"},
            {"answer": "HORSESHOE", "hint": "U-shaped magnet"},
        ], "points": 15},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["magnet", "attract", "repel", "poles", "steel", "iron"], "sentences": [
            {"text": "A ___ attracts steel objects.", "answer": "magnet"},
            {"text": "Different poles ___ each other.", "answer": "attract"},
            {"text": "Same poles ___ each other.", "answer": "repel"},
            {"text": "All magnets have two ___.", "answer": "poles"},
        ], "points": 15},
    ],
    "5.1": [
        {"type": "puzzle", "title": "Earth Surface Puzzle", "image": "natural_resources", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["AIR", "LAND", "WATER", "MOUNTAIN", "PLAIN", "WIND"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "MOUNTAIN", "hint": "Where land is high"},
            {"answer": "PLAIN", "hint": "Where land is flat"},
            {"answer": "OCEAN", "hint": "Has saltwater"},
        ], "points": 15},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["air", "land", "water", "mountain", "plain", "wind"], "sentences": [
            {"text": "Moving air is called ___.", "answer": "wind"},
            {"text": "A ___ is where land is high.", "answer": "mountain"},
            {"text": "A ___ is where land is flat.", "answer": "plain"},
            {"text": "Fish live in ___.", "answer": "water"},
        ], "points": 15},
    ],
    "5.2": [
        {"type": "puzzle", "title": "Rocks Puzzle", "image": "rock_boulder", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["ROCK", "BOULDER", "GRAVEL", "SAND", "CLAY", "COLOR"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "BOULDER", "hint": "A very big rock"},
            {"answer": "GRAVEL", "hint": "Medium rock pieces"},
            {"answer": "CLAY", "hint": "Smallest rock pieces"},
        ], "points": 15},
        {"type": "sequence", "title": "Rock Sizes (small to large)", "items": ["Clay", "Sand", "Gravel", "Boulder"], "points": 20},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["rock", "boulder", "gravel", "sand", "clay", "color"], "sentences": [
            {"text": "A very big rock is a ___.", "answer": "boulder"},
            {"text": "___ is smaller than gravel.", "answer": "sand"},
            {"text": "Rocks break down into ___ and clay.", "answer": "sand"},
        ], "points": 15},
    ],
    "5.3": [
        {"type": "puzzle", "title": "Soil Puzzle", "image": "soil", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["SOIL", "SAND", "CLAY", "EARTHWORM", "ANT", "TOPSOIL"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "SOIL", "hint": "Loose upper layer of Earth"},
            {"answer": "TOPSOIL", "hint": "Top layer of soil"},
            {"answer": "EARTHWORM", "hint": "Living thing in soil"},
        ], "points": 15},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["soil", "topsoil", "sand", "clay", "earthworm", "rock"], "sentences": [
            {"text": "The top layer of soil is ___.", "answer": "topsoil"},
            {"text": "An ___ is a living thing in soil.", "answer": "earthworm"},
            {"text": "Deep under topsoil is ___.", "answer": "rock"},
        ], "points": 15},
    ],
    "5.4": [
        {"type": "puzzle", "title": "Resources Puzzle", "image": "tree_trunk", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["AIR", "TREE", "WATER", "PAPER", "WOOD", "SAFE"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "WATER", "hint": "People drink this resource"},
            {"answer": "PAPER", "hint": "Made from trees"},
            {"answer": "JACKET", "hint": "Keeps you safe in water"},
        ], "points": 15},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["air", "trees", "water", "paper", "furniture", "safe"], "sentences": [
            {"text": "People breathe ___.", "answer": "air"},
            {"text": "Paper is made from ___.", "answer": "trees"},
            {"text": "People drink ___.", "answer": "water"},
        ], "points": 15},
    ],
    "5.5": [
        {"type": "puzzle", "title": "Conserve Puzzle", "image": "recycle", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["REDUCE", "REUSE", "RECYCLE", "CONSERVE", "WASTE", "PROTECT"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "REDUCE", "hint": "Use less of something"},
            {"answer": "REUSE", "hint": "Use something again"},
            {"answer": "RECYCLE", "hint": "Change into something new"},
            {"answer": "CONSERVE", "hint": "Protect from waste"},
        ], "points": 15},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["reduce", "reuse", "recycle", "conserve", "waste", "new"], "sentences": [
            {"text": "To use less is to ___.", "answer": "reduce"},
            {"text": "To use again is to ___.", "answer": "reuse"},
            {"text": "To change into something new is to ___.", "answer": "recycle"},
            {"text": "To protect from waste is to ___.", "answer": "conserve"},
        ], "points": 15},
    ],
    "6.1": [
        {"type": "puzzle", "title": "Sky Puzzle", "image": "sky_day", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["SUN", "MOON", "STAR", "CLOUD", "PHASE", "FULL", "NEW"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "PHASE", "hint": "Shape of the moon seen in sky"},
            {"answer": "CLOUD", "hint": "In sky for a short time"},
            {"answer": "STARS", "hint": "Seen in nighttime sky"},
        ], "points": 15},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["sun", "moon", "stars", "clouds", "phase", "full"], "sentences": [
            {"text": "The ___ is always in the daytime sky.", "answer": "sun"},
            {"text": "A bright circle moon is a ___ moon.", "answer": "full"},
            {"text": "The moon shape is called a ___.", "answer": "phase"},
        ], "points": 15},
    ],
    "6.2": [
        {"type": "puzzle", "title": "The Sun Puzzle", "image": "sun", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["SUN", "STAR", "LIGHT", "HEAT", "SHADOW", "CLOSE"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "STAR", "hint": "A huge ball of gases"},
            {"answer": "SHADOW", "hint": "Dark area when light is blocked"},
            {"answer": "CLOSEST", "hint": "Why the sun looks big"},
        ], "points": 15},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["sun", "star", "light", "heat", "shadow", "plants"], "sentences": [
            {"text": "The sun is a ___.", "answer": "star"},
            {"text": "A ___ forms when light is blocked.", "answer": "shadow"},
            {"text": "The sun gives Earth light and ___.", "answer": "heat"},
            {"text": "Plants need ___ to grow.", "answer": "light"},
        ], "points": 15},
    ],
    "6.3": [
        {"type": "puzzle", "title": "Earth Rotation Puzzle", "image": "earth_rotation", "grid": 3, "points": 20},
        {"type": "wordsearch", "title": "Word Hunt", "words": ["ROTATION", "DAY", "NIGHT", "SPIN", "RISE", "SET", "PATTERN"], "points": 15},
        {"type": "scramble", "title": "Word Scramble", "items": [
            {"answer": "ROTATION", "hint": "Causes day and night"},
            {"answer": "PATTERN", "hint": "Sun and stars form this"},
            {"answer": "NOON", "hint": "Sun is highest at this time"},
        ], "points": 15},
        {"type": "fillblank", "title": "Fill the Blanks", "word_bank": ["rotation", "day", "night", "rise", "set", "noon"], "sentences": [
            {"text": "Earth's ___ causes day and night.", "answer": "rotation"},
            {"text": "The sun seems to ___ in the morning.", "answer": "rise"},
            {"text": "The sun is highest at ___.", "answer": "noon"},
            {"text": "The sun seems to ___ in the evening.", "answer": "set"},
        ], "points": 15},
    ],
}


def get_games(section_code):
    games = list(GAMES.get(section_code, []))
    for i, g in enumerate(games):
        if g["type"] == "puzzle":
            games.insert(i + 1, {
                "type": "dragpuzzle",
                "title": "Drag & Drop Puzzle",
                "image": g["image"],
                "grid": g["grid"],
                "points": 20,
            })
            break
    return games
