-
Notifications
You must be signed in to change notification settings - Fork 839
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
932 additions
and
175 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# ** Language Learner Adventure ** | ||
|
||
|
||
<br> | ||
|
||
## **Description 📃** | ||
|
||
The goal of the game is to help players learn new vocabulary by matching words with their correct translations. Players answer multiple-choice questions and receive feedback on their answers. A scoring system tracks their progress. | ||
|
||
|
||
## **functionalities 🎮** | ||
|
||
- The game displays a word in the target language. | ||
- Players choose the correct translation from multiple options. | ||
- Feedback is given for each answer, indicating whether it was correct or incorrect. | ||
- The score increases with each correct answer. | ||
- The game continues until all questions have been answered. | ||
- The final score is displayed at the end. | ||
|
||
|
||
<br> | ||
|
||
## **How to play? 🕹️** | ||
|
||
- Initialization: | ||
- Load the first question. | ||
- Initialize the score to 0. | ||
- Display the question and answer options. | ||
|
||
- Answer Selection: | ||
- When a player selects an answer, check if it is correct. | ||
- Update the score if the answer is correct. | ||
- Provide feedback based on the correctness of the answer. | ||
|
||
- Next Question: | ||
- Move to the next question when the player clicks the "Next" button. | ||
- If there are no more questions, display the final score and end the game. | ||
|
||
- End of Game: | ||
- Display a message indicating the game is complete. | ||
- Show the player's final score. | ||
|
||
<br> | ||
|
||
## **Screenshots 📸** | ||
|
||
<br> | ||
|
||
![image](../../assets/images/Language_Learner_Adventure.png) | ||
|
||
<br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Language Learner Adventure</title> | ||
<link rel="stylesheet" href="styles.css"> | ||
</head> | ||
<body> | ||
<div id="game-container"> | ||
<h1>Language Learner Adventure</h1> | ||
<div id="score-container">Score: <span id="score">0</span></div> | ||
<div id="question-container"> | ||
<p id="question">Translate the word: <span id="word"></span></p> | ||
<div id="options"></div> | ||
</div> | ||
<button id="next-button" class="game-button">Next</button> | ||
<p id="feedback"></p> | ||
</div> | ||
<script src="script.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
const questions = [ | ||
{ word: 'apple', correct: 'manzana', options: ['manzana', 'pera', 'plátano', 'uva'] }, | ||
{ word: 'dog', correct: 'perro', options: ['gato', 'caballo', 'perro', 'ratón'] }, | ||
{ word: 'house', correct: 'casa', options: ['edificio', 'casa', 'escuela', 'tienda'] }, | ||
{ word: 'book', correct: 'libro', options: ['revista', 'periódico', 'libro', 'cuaderno'] }, | ||
{ word: 'car', correct: 'coche', options: ['bicicleta', 'coche', 'avión', 'barco'] } | ||
]; | ||
|
||
let currentQuestionIndex = 0; | ||
let score = 0; | ||
|
||
document.getElementById('next-button').addEventListener('click', nextQuestion); | ||
|
||
function loadQuestion() { | ||
const question = questions[currentQuestionIndex]; | ||
document.getElementById('word').innerText = question.word; | ||
const optionsContainer = document.getElementById('options'); | ||
optionsContainer.innerHTML = ''; | ||
question.options.forEach(option => { | ||
const button = document.createElement('button'); | ||
button.className = 'option-button'; | ||
button.innerText = option; | ||
button.addEventListener('click', () => checkAnswer(option)); | ||
optionsContainer.appendChild(button); | ||
}); | ||
document.getElementById('feedback').innerText = ''; | ||
} | ||
|
||
function checkAnswer(selected) { | ||
const question = questions[currentQuestionIndex]; | ||
if (selected === question.correct) { | ||
score++; | ||
document.getElementById('feedback').innerText = 'Correct!'; | ||
} else { | ||
document.getElementById('feedback').innerText = `Incorrect! The correct answer is ${question.correct}.`; | ||
} | ||
document.getElementById('score').innerText = score; | ||
} | ||
|
||
function nextQuestion() { | ||
currentQuestionIndex++; | ||
if (currentQuestionIndex < questions.length) { | ||
loadQuestion(); | ||
} else { | ||
document.getElementById('question-container').innerHTML = '<p>You have completed the quiz!</p>'; | ||
document.getElementById('next-button').style.display = 'none'; | ||
document.getElementById('feedback').innerText = `Final Score: ${score}`; | ||
} | ||
} | ||
|
||
// Initialize the first question | ||
loadQuestion(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
body { | ||
font-family: Arial, sans-serif; | ||
background-color: #f5f5f5; | ||
color: #333; | ||
text-align: center; | ||
margin: 0; | ||
padding: 20px; | ||
} | ||
|
||
#game-container { | ||
width: 80%; | ||
margin: 0 auto; | ||
padding: 20px; | ||
background-color: #fff; | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
border-radius: 10px; | ||
} | ||
|
||
#question-container { | ||
margin-bottom: 20px; | ||
} | ||
|
||
.game-button { | ||
padding: 10px 20px; | ||
font-size: 16px; | ||
cursor: pointer; | ||
border: none; | ||
background-color: #4CAF50; | ||
color: white; | ||
border-radius: 5px; | ||
} | ||
|
||
#options { | ||
display: flex; | ||
justify-content: center; | ||
flex-wrap: wrap; | ||
} | ||
|
||
.option-button { | ||
padding: 10px 20px; | ||
margin: 5px; | ||
font-size: 16px; | ||
cursor: pointer; | ||
border: none; | ||
background-color: #f0f0f0; | ||
border-radius: 5px; | ||
transition: background-color 0.3s; | ||
} | ||
|
||
.option-button:hover { | ||
background-color: #e0e0e0; | ||
} | ||
|
||
#feedback { | ||
margin-top: 20px; | ||
font-size: 18px; | ||
} | ||
|
||
#score-container { | ||
font-size: 20px; | ||
margin-bottom: 20px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Sky Jumper Game | ||
|
||
A simple 2D platformer game where the player jumps between platforms in a sky-themed environment. This game is built using HTML, CSS, and JavaScript. | ||
|
||
## Overview | ||
|
||
Sky Jumper is a basic web-based game where the player controls a character that can jump between floating platforms. It features: | ||
- Gravity and jumping mechanics | ||
- Basic platform collision detection | ||
- Simple controls using arrow keys and the space bar | ||
|
||
## Features | ||
|
||
- **Player Movement**: Move left and right using arrow keys. | ||
- **Jumping**: Jump using the space bar. | ||
- **Platforms**: Jump between floating platforms in the sky. | ||
- **Responsive Canvas**: Adjusts to the window size. | ||
|
||
## Getting Started | ||
|
||
### Prerequisites | ||
|
||
No additional software is required other than a modern web browser. | ||
|
||
### Setup | ||
|
||
1. **Clone the Repository** | ||
|
||
```bash | ||
git clone <repository-url> | ||
cd sky-jumper |
Oops, something went wrong.