Skip to content

adrian1715/letrico

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฏ Letrico

Letrico Logo

A Portuguese word puzzle game inspired by Wordle, and mainly its Brazilian version, Letreco

Live Demo HTML5 CSS3 JavaScript Bootstrap

๐ŸŽฎ Play Now โ€ข ๐Ÿ“ Report Bug โ€ข โœจ Request Feature


๐Ÿ“– About The Project

Letrico is an interactive word puzzle game built with vanilla JavaScript, inspired by the popular game "Wordle" - or "Letreco" in Brazil. Players have 6 attempts to guess a 5-letter Portuguese word, with visual feedback provided after each guess to help narrow down the possibilities.

๐ŸŽฎ How It Works

  • ๐Ÿ”ค Guess the Word: Enter a valid 5-letter Portuguese word
  • ๐ŸŸฉ Green: Letter is correct and in the right position
  • ๐ŸŸจ Yellow: Letter is in the word but in the wrong position
  • โฌœ Gray: Letter is not in the word
  • ๐ŸŽฏ 6 Attempts: You have six chances to guess the correct word

๐ŸŒŸ Key Features

  • โœ… Pure Vanilla JavaScript - No frameworks or libraries (except Bootstrap for UI)
  • ๐ŸŽจ Beautiful UI - Clean, responsive design with smooth animations
  • ๐Ÿ‡ง๐Ÿ‡ท Portuguese Words - Extensive dictionary of Brazilian Portuguese words
  • ๐Ÿ“Š Visual Feedback - Intuitive color-coded hints
  • ๐Ÿ“ฑ Fully Responsive - Works seamlessly on mobile and desktop
  • โšก Fast Performance - Lightweight and optimized for speed
  • ๐ŸŽฏ Simple Gameplay - Easy to learn, challenging to master

๐Ÿš€ Live Demo

Play Letrico Now โ†’

alt text

Try to guess today's word! Challenge your friends and see who can solve it in fewer attempts.


๐Ÿ› ๏ธ Built With

  • HTML5 - Semantic markup structure
  • CSS3 - Custom styling and animations
  • JavaScript (ES6+) - Game logic and interactivity
  • Bootstrap 5 - Responsive UI framework

๐Ÿ’ป Getting Started

Prerequisites

  • A modern web browser (Chrome, Firefox, Safari, Edge)
  • No additional installations required!

Installation

  1. Clone the repository

    git clone https://github.com/adrian1715/letrico.git
    cd letrico
  2. Open in browser

    Simply open index.html in your web browser:

    # On macOS
    open index.html
    
    # On Linux
    xdg-open index.html
    
    # On Windows
    start index.html
  3. Or use a local server (optional)

    # Using Python 3
    python -m http.server 8000
    
    # Using Node.js http-server
    npx http-server

    Then navigate to http://localhost:8000


๐Ÿ“ Project Structure

letrico/
โ”œโ”€โ”€ index.html          # Main HTML structure
โ”œโ”€โ”€ style.css          # Custom styles
โ”œโ”€โ”€ app.js             # Game logic and functionality
โ”œโ”€โ”€ words.js           # Portuguese word dictionary
โ””โ”€โ”€ README.md          # Documentation (English)
โ””โ”€โ”€ README-ptbr.md     # Documentation (Portuguese)

๐ŸŽฏ How to Play

  1. Start the Game

    • Open the game in your browser
    • The game automatically selects a random 5-letter word
  2. Make Your Guess

    • Type a valid 5-letter Portuguese word in the input field
    • Click "Chutar" (Guess) or press Enter
  3. Check the Feedback

    • ๐ŸŸฉ Green tiles - Correct letter in correct position
    • ๐ŸŸจ Yellow tiles - Correct letter in wrong position
    • โฌœ Gray tiles - Letter not in the word
  4. Win or Lose

    • Guess the word correctly within 6 attempts to win!
    • If you run out of attempts, the correct word will be revealed

Example Gameplay

Attempt 1: CARRO
Result: C๐ŸŸจ Aโฌœ R๐ŸŸฉ Rโฌœ Oโฌœ

Attempt 2: VERDE
Result: Vโฌœ E๐ŸŸจ R๐ŸŸฉ Dโฌœ E๐ŸŸจ

Attempt 3: CERVO
Result: C๐ŸŸฉ E๐ŸŸฉ R๐ŸŸฉ V๐ŸŸฉ O๐ŸŸฉ
โœ… You Win!

๐ŸŽจ Features in Detail

Game Mechanics

  • Word Validation: Checks if entered word is valid Portuguese
  • Color-Coded Feedback: Visual hints after each guess
  • Attempt Counter: Tracks remaining guesses
  • Game State Management: Win/lose conditions and game reset

User Interface

  • Responsive Grid: 6 rows ร— 5 columns for guesses
  • Interactive Keyboard: Click or type to play
  • Smooth Animations: Tile flips and color transitions
  • Clean Design: Minimalist interface inspired by modern word games

Technical Highlights

  • No External Dependencies (except Bootstrap for UI)
  • Clean Code Architecture: Modular and maintainable
  • Performance Optimized: Fast load times and smooth gameplay
  • Cross-Browser Compatible: Works on all modern browsers

๐Ÿ”ง Code Overview

Main Files

app.js - Core game logic

// Key functions include:
- Word selection from dictionary
- Input validation and processing
- Color-coding logic for letter feedback
- Win/lose condition checking
- Game state management

words.js - Word database

// Contains:
- Array of valid 5-letter Portuguese words
- Used for both answer selection and input validation

index.html - Game interface

<!-- Structure includes:
- Game title and header
- 6ร—5 grid for guesses
- Input field and submit button
- Win/lose message display
-->

๐ŸŒ Browser Compatibility

Browser Supported Version
Chrome โœ… 90+
Firefox โœ… 88+
Safari โœ… 14+
Edge โœ… 90+
Opera โœ… 76+

๐Ÿ“ฑ Responsive Design

Letrico is fully responsive and works perfectly on:

  • ๐Ÿ“ฑ Mobile Phones (320px+)
  • ๐Ÿ“ฑ Tablets (768px+)
  • ๐Ÿ’ป Laptops (1024px+)
  • ๐Ÿ–ฅ๏ธ Desktops (1440px+)

๐ŸŽ“ What I Learned

Building Letrico helped me improve my skills in:

  • โœ… DOM Manipulation: Dynamic content updates and event handling
  • โœ… Game Logic: State management and rule implementation
  • โœ… CSS Animations: Smooth transitions and visual effects
  • โœ… Responsive Design: Mobile-first approach
  • โœ… User Experience: Intuitive interface design
  • โœ… Vanilla JavaScript: Building complex features without frameworks

๐Ÿค Contributing

Contributions are welcome! If you have suggestions or improvements:

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“ License

This project is open source and available under the MIT License.


๐Ÿ‘จโ€๐Ÿ’ป Author

Adrian Lobato


๐Ÿ™ Acknowledgments

  • Inspired by Wordle by Josh Wardle
  • Built with โค๏ธ for Portuguese speakers
  • Special thanks to the Brazilian Portuguese word list contributors

๐Ÿ“Š Project Stats

GitHub last commit GitHub repo size GitHub top language


If you like this project, please consider giving it a โญ

I truly appreciate your support!

โฌ† Back to Top

About

An interactive word puzzle game built with vanilla JavaScript, inspired by the popular game "Wordle" - or "Letreco" in Brazil.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published