added project 2
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname "$0")/setup/common.sh"
|
||||
source "$(dirname "$0")/setup/challenges.sh"
|
||||
|
||||
# Function to start a challenge
|
||||
start_challenge() {
|
||||
local challenge_id=$1
|
||||
|
||||
# Clear screen and show welcome message
|
||||
clear
|
||||
echo -e "${BOLD}🎮 Command Line Mastery Challenge${NC}"
|
||||
echo "=============================="
|
||||
|
||||
# Show challenge details
|
||||
get_challenge_details "$challenge_id"
|
||||
|
||||
# Initialize challenge environment
|
||||
echo -e "\n${BLUE}Setting up challenge environment...${NC}"
|
||||
"$CHALLENGE_DIR/.tracking/level1-setup.sh"
|
||||
|
||||
# Record start time
|
||||
local start_time=$(date +%s)
|
||||
echo "$challenge_id,$start_time" > "$CHALLENGE_DIR/.tracking/current_challenge"
|
||||
|
||||
echo -e "\n${GREEN}Challenge environment ready!${NC}"
|
||||
echo -e "Type ${YELLOW}verify-challenge${NC} when you're ready to check your solution"
|
||||
echo -e "Type ${YELLOW}show-hint${NC} if you need help"
|
||||
echo -e "Type ${YELLOW}show-progress${NC} to see your progress\n"
|
||||
}
|
||||
|
||||
# Main execution
|
||||
if [[ $# -eq 0 ]]; then
|
||||
echo "Usage: $0 <challenge-id>"
|
||||
echo "Available challenges:"
|
||||
list_challenges
|
||||
exit 1
|
||||
fi
|
||||
|
||||
start_challenge "$1"
|
||||
Reference in New Issue
Block a user