Files
crumbmissions/crumbmission/mission_selector_mission_1.sh
Branko May Trinkwald 2915828adf Add complete Crumbforest mission system
- Interactive mission selector with metadata-driven design
- 5 educational missions (basics + advanced)
- AI assistant roles (Deepbit, Bugsy, Schnippsi, Tobi)
- SnakeCam gesture recognition system
- Token tracking utilities
- CLAUDE.md documentation
- .gitignore for logs and secrets
2025-12-21 01:16:48 +01:00

71 lines
2.2 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
clear
echo "🌟 Willkommen im Crumbforest Missionszentrum!"
sleep 1
cd /home/zero || exit
while true; do
echo ""
echo "Wähle deine erste Mission:"
echo ""
PS3="🔢 Gib die Zahl deiner Wahl ein: "
options=("🦊 Fridolin (Pfadfinder)" "🛠️ Balu (Bau-Elf)" "🐈🦉 Noko (Leser der Tiefe)" "📦 Blockly-Code senden" "❌ Beenden")
select opt in "${options[@]}"
do
case $REPLY in
1)
echo ""
echo "🦊 Fridolin zeigt dir die Pfade des Waldes!"
echo "🔍 Fridolin hat Folgendes gefunden:"
ls -l /home/robot/geheimversteck/
;;
2)
echo ""
echo "🛠️ Balu hilft dir beim Bauen eines Verstecks!"
mkdir -p /home/robot/geheimversteck
echo "Versteck erstellt: /home/robot/geheimversteck/"
;;
3)
echo ""
echo "🐈🦉 Noko hilft dir beim Lesen der Waldbotschaften."
if [ -f /home/robot/geheimversteck/gruss.txt ]; then
cat /home/robot/geheimversteck/gruss.txt
else
echo "Noch kein Gruß gefunden"
fi
;;
4)
GRUSS=$(cat /home/robot/geheimversteck/gruss.txt 2>/dev/null || echo "Hallo Krümel")
RESPONSE=$(curl -s -X POST http://host.docker.internal:8080/crumbapi/blockly-terminal \
-H "Content-Type: application/json" \
-d "{\"blockcode\": \"window.alert(\\\"$GRUSS\\\")\"}")
echo "📬 Antwort vom Server:"
echo "$RESPONSE"
# JSON loggen
echo "{
\"timestamp\": \"$(date -Iseconds)\",
\"user\": \"$USER\",
\"message\": \"$GRUSS\",
\"mission\": \"geheimversteck\",
\"status\": \"sent\"
}," >> /home/robot/grusslog.json
;;
5)
echo ""
echo "👋 Auf bald, kleiner Krümel!"
exit 0
;;
*)
echo "❗ Ungültige Auswahl bitte eine Zahl von 1 bis 5 eingeben."
;;
esac
break
done
done