Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions Games/Linux_Command_Challenge/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Linux Command Challenge

Linux Command Challenge is an educational browser game that helps users
practice common Linux terminal commands through a multiple-choice quiz.

## Project Purpose

The purpose of the game is to make Linux command practice interactive and
accessible. Players answer questions about common terminal operations and
receive immediate feedback explaining each command.

## Features

- Ten Linux command questions
- Multiple-choice answers
- Immediate correct and incorrect feedback
- Score tracking
- Question progress indicator
- Final results screen
- Restart functionality
- Responsive desktop and mobile design
- Keyboard-accessible buttons

## Commands Covered

- `pwd`
- `ls`
- `mkdir`
- `cd`
- `cp`
- `mv`
- `rm`
- `chmod`
- `ps`
- `systemctl`

## Technologies Used

- HTML5
- CSS3
- JavaScript

No external frameworks, packages, or libraries are required.

## How to Run the Game

1. Open the `Linux_Command_Challenge` folder.
2. Open `index.html` in a web browser.
3. Select **Start Challenge**.
4. Answer each question and review the feedback.
5. View the final score or restart the challenge.

## Testing

The game should be tested for the following:

- The start button opens the quiz.
- All ten questions appear.
- Correct answers increase the score.
- Incorrect answers do not increase the score.
- Feedback appears after every answer.
- The progress indicator updates.
- The final result screen displays the correct score.
- The restart button resets the game.
- The layout works on desktop and mobile screens.
- The browser console contains no errors.

## Use Cases

- A beginner practices basic Linux commands.
- A student reviews terminal commands before a quiz or lab.
- A user receives immediate feedback after selecting an answer.
- A player repeats the quiz to improve their score.
126 changes: 126 additions & 0 deletions Games/Linux_Command_Challenge/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta
name="viewport"
content="width=device-width, initial-scale=1.0"
>
<meta
name="description"
content="An educational quiz game for practicing common Linux commands."
>

<title>Linux Command Challenge</title>

<link rel="stylesheet" href="style.css">
</head>

<body>
<main class="game-container">
<header class="game-header">
<div class="terminal-icon" aria-hidden="true">&gt;_</div>

<div>
<h1>Linux Command Challenge</h1>
<p>Test your knowledge of common Linux terminal commands.</p>
</div>
</header>

<section
id="start-screen"
class="screen"
aria-labelledby="start-title"
>
<h2 id="start-title">Ready to begin?</h2>

<p>
Answer 10 multiple-choice questions about Linux commands.
You will receive immediate feedback after each answer.
</p>

<button id="start-button" class="primary-button">
Start Challenge
</button>
</section>

<section
id="quiz-screen"
class="screen hidden"
aria-labelledby="question-text"
>
<div class="quiz-status">
<p>
Question
<span id="question-number">1</span>
of
<span id="total-questions">10</span>
</p>

<p>
Score:
<span id="score">0</span>
</p>
</div>

<div class="progress-bar" aria-hidden="true">
<div id="progress-fill" class="progress-fill"></div>
</div>

<div class="question-card">
<p class="command-prompt">Select the correct command:</p>

<h2 id="question-text"></h2>

<div
id="answer-buttons"
class="answer-buttons"
role="group"
aria-label="Answer choices"
></div>

<div
id="feedback"
class="feedback hidden"
role="status"
aria-live="polite"
></div>

<button
id="next-button"
class="primary-button hidden"
>
Next Question
</button>
</div>
</section>

<section
id="result-screen"
class="screen hidden"
aria-labelledby="result-title"
>
<h2 id="result-title">Challenge Complete</h2>

<p class="final-score">
You scored
<span id="final-score">0</span>
out of
<span id="final-total">10</span>.
</p>

<p id="result-message"></p>

<button id="restart-button" class="primary-button">
Play Again
</button>
</section>

<footer>
<p>Created with HTML, CSS, and JavaScript.</p>
</footer>
</main>

<script src="script.js"></script>
</body>
</html>
Loading
Loading