Skip to content

LogicPlayJS is an educational project that teaches programming logic with JavaScript through a number-guessing game. It covers conditionals, loops, string concatenation, and best coding practices. With a simple HTML/CSS interface and JavaScript logic, it’s perfect for beginners or anyone reinforcing foundational programming skills.

Notifications You must be signed in to change notification settings

petersonchiquetto/LogicPlayJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LogicPlayJS

Welcome to LogicPlayJS, an educational project designed to teach programming logic through a fun and interactive number-guessing game built with JavaScript. Whether you're a beginner or looking to strengthen your foundational skills, this project offers a hands-on approach to learning programming concepts.


🚀 Features

  • Dynamic Gameplay: Players guess a secret number, receiving hints on whether their guesses are too high or too low.
  • Interactive Feedback: Real-time alerts and prompts guide players to improve their logic.
  • Clean and Responsive Design: Styled with modern CSS, ensuring a visually appealing experience across devices.

🛠️ Technologies Used

Frontend

  • HTML5: Semantic structure for the game layout.
  • CSS3: A responsive design with gradients, shadows, and images for an immersive feel.

Backend Logic

  • JavaScript (ES6): Core game mechanics, including:
    • Random number generation.
    • Input handling with prompt and alert.
    • Conditional logic for game progression.
    • Looping constructs for repeated guessing.

💡 Programming Techniques

  1. Conditionals and Comparisons
    • Used if-else statements to evaluate player input and provide feedback.
  2. Loops and Attempts
    • Implemented a while loop to allow repeated guesses until the correct number is found.
  3. String Concatenation
    • Dynamic messages guide the player, adjusting based on their guesses.
  4. Code Modularity
    • Clear and descriptive variable names, making the code easy to understand and maintain.
  5. Randomization
    • Generated the secret number using Math.random() to ensure unique gameplay.

🎮 How to Play

  1. Clone the repository:

    git clone https://github.com/yourusername/LogicPlayJS.git
  2. Open the index.html file in your favorite browser.

  3. Follow the on-screen instructions to guess the secret number:

    • You will receive hints whether your guess is too high or too low.
    • Keep guessing until you find the correct number!

📁 Project Structure

LogicPlayJS/
|-- index.html       # Main HTML file
|-- style.css        # Styling for the game interface
|-- app.js           # Core game logic
|-- img/             # Images used in the design

🤔 Challenges and Learning Objectives

  • Understand the flow of a simple game logic.
  • Apply JavaScript concepts such as loops, conditionals, and randomization.
  • Learn to create dynamic and interactive user experiences.

🌟 Future Improvements

  • Add difficulty levels (e.g., easy, medium, hard) with different number ranges.
  • Include a scoring system to track player performance.
  • Enhance the interface with animations or additional visual elements.

📝 License

This project is licensed under the MIT License. Feel free to use, modify, and distribute it as you like.


Enjoy coding with LogicPlayJS and level up your programming skills!

About

LogicPlayJS is an educational project that teaches programming logic with JavaScript through a number-guessing game. It covers conditionals, loops, string concatenation, and best coding practices. With a simple HTML/CSS interface and JavaScript logic, it’s perfect for beginners or anyone reinforcing foundational programming skills.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published