#!/usr/bin/env bash
#
# If you are reading this, you have wandered out of bounds
# and are reading the code that drives the game.
#
#                    Congratulations!
#
# Learning Linux is all about curiosity, so read this code and see
# if you can figure out what it does.
#
# When you're ready to continue playing the game, though, stick to
# the scrolls. If you're stuck, go to Gitlab and create an issue.
# We're happy to provide hints.
#

ITEM=sword

if ! grep --quiet "$ITEM" <<< "$I" ; then
    cat << EOF
You have found a gleaming silver **sword**!  You marvel at
its craftsmanship, and you recall tales from your childhood
of the great mystic king Rannismir who bore such a sword to
protect the kingdom from the undead.

Add this item to your inventory:

export I=$ITEM,\$I

Remember, you can check your inventory:

echo \$I

EOF
    mv ../../.chapel ../../chapel 2>/dev/null
    mv ../../.vault ../../vault 2>/dev/null
    mv ../../.scrap ../../scrap 2>/dev/null
else
    echo "This treasure has already been taken."
fi

























































































































































































































































































# Hmm, that didn't work!
#
# Maybe the scroll can provide a clue.

