Skip to content

AlejandroFrias/ghost

Repository files navigation

GHOST: Wordle meets Mastermind

GHOST is an old paper and pen game that is like a mix between Wordle and that old board game Mastermind. In the original you play against another person. You start by each writing down your own 5-letter secret word. Then you take turns trying to guess the other person's word. The clues are Mastermind style, meaning you get the number of correct letters that were in the correct location and the number of correct letters in the wrong position, but you have to figure out which letters those are yourself.

In this version, you can play against the computer, just trying to guess the random word.

Getting Started

Installation

Install the dependencies:

npm install

Development

Start the development server with HMR:

npm run dev

Game will be available at http://localhost:5173.

Testing

Run the test suite with:

npm run test

Test files are, where possible, co-located with the files they test. Look for *.test.ts files with matching names to the files they provide unittests for.

Typecheck

Run typecheck manually with:

npm run typecheck

Building for Production

Create a production build:

npm run build

Deployment

Docker Deployment

To build and run using Docker:

docker build -t my-app .

# Run the container
docker run -p 3000:3000 my-app

The containerized application can be deployed to any platform that supports Docker, including:

  • AWS ECS
  • Google Cloud Run
  • Azure Container Apps
  • Digital Ocean App Platform
  • Fly.io
  • Railway

DIY Deployment

If you're familiar with deploying Node applications, the built-in app server is production-ready.

Make sure to deploy the output of npm run build

├── package.json
├── package-lock.json (or pnpm-lock.yaml, or bun.lockb)
├── build/
│   ├── client/    # Static assets
│   └── server/    # Server-side code

Credits

I took a lot of parts from Josh W Comeau's Joy of React Wordle project as a starting point. I also used this project as a way to play around with some of the course material, like the reducer/context pattern for handling game data and game actions. Thanks Josh!

About

Wordle meets Mastermind

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages