Skip to content

CowBull is a fun and interactive word-guessing game where players challenge their vocabulary and deduction skills. Built with HTML, CSS, JavaScript, and Node.js, it combines engaging gameplay with modern web technologies.

Notifications You must be signed in to change notification settings

Aish-p/CowBull-Word-Guessing-Game

Repository files navigation

CowBull-Word-Guessing-Game

CowBull is a fun and interactive word guessing game, built with a combination of HTML, CSS, JavaScript, Node.js, Express, Webpack, and Babel. The game challenges players to guess a secret word within a limited number of attempts. The secret word is generated randomly, and the player receives feedback on each guess, represented as cows (correct letters in the wrong position) and bulls (correct letters in the correct position).

This project demonstrates the integration of both front-end and back-end technologies, where the front-end provides an engaging user interface and the back-end handles the generation of words and validation of guesses.

Key Features:

  • Word Guessing: Players guess a secret word by entering letters into a grid.
  • Feedback System: Feedback is provided in the form of "cows" and "bulls" to help players adjust their guesses.
  • Responsive Layout: The game is fully responsive, making it playable on both desktop and mobile devices.
  • Dynamic Word Generation: Words are generated dynamically via external APIs to provide a new challenge each time.
  • Virtual Keyboard: Users can interact with the game using either a physical or a virtual on-screen keyboard.
  • Game Rules Reference: The game includes a built-in rules modal for quick reference.

This project leverages Webpack for module bundling and Babel to ensure compatibility across modern browsers. The back-end, powered by Node.js and Express, manages API calls for word generation and validation, ensuring a seamless and dynamic gameplay experience.

Demo

Here are screenshots from the CowBull game page:

Screenshots

Game Page

Game Page

Game Options Display

Game Options Display

Game Grid Page

Game Grid Page

Game Rules Reference Display

Game Rules Reference Display

Game Guessing Grid with Virtual Keyboard and Result Display

Game Guessing Grid with virtual keyboard and result display

Victory Display

Victory Game Display

Installation

To run CowBull locally, follow these steps:

  1. Clone the repository to your local machine.
  2. Install the required dependencies.
    npm install
  3. Create a .env file in the project root and add your API key for dictionary lookup. You can obtain an API key from dictionaryapi.com.
    API_KEY=your-api-key-here
  4. Start the development server.
    npm start
  5. Open your web browser and visit http://localhost:3000 to play CowBull.

How to Play

Welcome to CowBull, the word-guessing game!

  1. Enter your guesses using either the virtual keyboard or your physical keyboard.
  2. Submit your guess by clicking the Enter button.
  3. Based on your guess:
    • Cows indicate correct letters in the wrong position.
    • Bulls indicate correct letters in the correct position.
  4. Use the feedback to refine your guesses.
  5. Guess the secret word before running out of attempts!

API Usage

This project uses the following APIs:

Random Word API

  • Generates a random word of a specific length to serve as the secret word.

Dictionary API

  • The Dictionary API is used to check if a word is valid and in the dictionary.
  • Requires an API key, which you can obtain from dictionaryapi.com and store it in your .env file as API_KEY.

About

CowBull is a fun and interactive word-guessing game where players challenge their vocabulary and deduction skills. Built with HTML, CSS, JavaScript, and Node.js, it combines engaging gameplay with modern web technologies.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published