Skip to content

chrooks/Connections

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Connections

The Connections Game is a web application inspired by the NY Times game, offering players a challenging and engaging way to test their ability to identify connections between words. Built with Flask and React, this game challenges players to select sets of words that share a common theme from a grid. Success reveals interesting connections and further enriches the gameplay experience.

Features

  • Dynamic Word Grids: Every game generates a unique set of words and connections, ensuring a fresh challenge for players every time.
  • Game State Management: Players have a limited number of guesses to find all connections, with the game tracking and displaying mistakes left.
  • Responsive Design: A user-friendly interface that adjusts to various screen sizes for an optimal playing experience.

Getting Started

Prerequisites

  • Python 3.6+
  • Node.js and npm
  • Flask
  • React

Installation

  1. Clone the repository
git clone https://github.com/chrooks/Connections.git
cd Connections
  1. Set up the Python virtual environment
python3 -m venv venv
source venv/bin/activate  # On Windows use `venv\Scripts\activate`
pip install -r backend/requirements.txt
  1. Start the Flask backend
cd backend
export FLASK_APP=app.py  # On Windows use `set FLASK_APP=app.py`
export FLASK_ENV=development  # On Windows use `set FLASK_ENV=development`
flask run
  1. Install and run the React frontend
cd ../frontend
npm install
npm start

Your application should now be running on localhost:3000 (frontend) and the Flask backend on localhost:5000.

Playing the Game

  • Navigate to http://localhost:3000 in your web browser to start playing.
  • Press the "Play" button to generate a new grid of words.
  • Select four words that you believe are connected and submit your guess.
  • If correct, the words will be removed and their connection revealed. If incorrect, try again until you find all connections or run out of guesses.

Technical Details

Technology Stack

  • Frontend:

    • Vite: Used for bootstrapping the frontend, offering a fast and efficient development experience with React.
    • React: Powers the dynamic user interface, making the game interactive and responsive.
    • TypeScript: Provides strong typing for React components and utilities, enhancing code quality and maintainability.
  • Backend:

    • Flask: A lightweight Python framework used for backend logic and API endpoints, facilitating the game's core functionalities.
    • Python: The primary programming language for backend development, chosen for its simplicity and effectiveness.
  • Word and Connection Generation:

    • LLM: Utilized to dynamically generate the words that compose the game's grid and their connections, ensuring a unique and challenging experience every game.

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue for any improvements or bug fixes.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Recreation of NY Times' game Connections using React and Flask

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published