#!/bin/bash # Reading Teacher - Game Generator # Creates gamified reading challenges set -e GREEN='\033[0;32m' BLUE='\033[0;34m' NC='\033[0m' print_success() { echo -e "${GREEN}✓ $1${NC}"; } print_info() { echo -e "${BLUE}ℹ $1${NC}"; } prompt_select() { local prompt="$1" local var_name="$2" shift 2 local options=("$@") echo -e "${BLUE}${prompt}${NC}" PS3="Select (1-${#options[@]}): " select opt in "${options[@]}"; do if [ -n "$opt" ]; then eval "$var_name='$opt'" break fi done } echo "" echo "╔════════════════════════════════════════════════════════════╗" echo "║ Reading Teacher - Game Generator 🎮 ║" echo "╚════════════════════════════════════════════════════════════╝" echo "" print_info "Step 1/3: Game Type" prompt_select "What type of game?" GAME_TYPE \ "Sight Word Speed Challenge" \ "Phonics Matching Game" \ "Word Building Adventure" \ "Reading Comprehension Quiz" print_info "Step 2/3: Difficulty" prompt_select "Difficulty level?" DIFFICULTY \ "Easy (Kindergarten)" \ "Medium (1st-2nd Grade)" \ "Hard (3rd+ Grade)" print_info "Step 3/3: Output" read -p "Game name (e.g., sight-word-game.html): " OUTPUT_FILE OUTPUT_DIR="./reading-games" mkdir -p "$OUTPUT_DIR" OUTPUT_PATH="$OUTPUT_DIR/$OUTPUT_FILE" print_info "🎮 Generating your reading game..." cat > "$OUTPUT_PATH" << 'EOF' 📚 Reading Game Challenge

🎯 Sight Word Challenge

Score
0
Streak
0
60
the

🎉 Time's Up!

0

EOF echo "" print_success "Game created: $OUTPUT_PATH" echo "" print_info "🎮 To play:" echo " open $OUTPUT_PATH" echo "" print_info "Game features:" echo " ✓ 60-second challenge" echo " ✓ Sight word practice" echo " ✓ Streak bonuses" echo " ✓ Keyboard controls (Space/Enter = Know, Arrow = Skip)" echo " ✓ Progress tracking" echo ""