Skip to content

AbdelrahmanAmgad201/Dots-Boxes-game

Repository files navigation

Dots and Boxes Game

Welcome to the classic Dots and Boxes game implemented in C! This engaging adaptation comes with a variety of features, including two distinct game modes (Easy 2x2 and Intermediate 5x5), the option to challenge the computer or a friend, undo/redo functionality, save/load capabilities, a vibrant terminal display, and a leaderboard showcasing the top 10 players.

Table of Contents

Game Modes

1. Easy Mode (2x2)

Dive into the world of Dots and Boxes with the easy mode, offering a quick and beginner-friendly 2x2 grid for enjoyable games.

2. Intermediate Mode (5x5)

For a more challenging experience, test your strategic skills on the larger 5x5 grid in the intermediate mode. Challenge the computer or compete against a friend for ultimate fun.

Features

  1. Save/Load Games

    • Save your ongoing game to resume later at your convenience.
    • Load previously saved games from your local device to pick up where you left off.
  2. Undo/Redo

    • Mistakes happen! Undo your last move to correct errors.
    • Feel like rethinking your undo? Redo and seamlessly continue the game.
  3. Colorful Terminal Display

    • Immerse yourself in the game with a visually appealing display enhanced with vibrant colors in the terminal.
  4. AI in Both Modes

    • Challenge yourself against a basic computer opponent in both Easy and Intermediate modes. Test your skills and strategic thinking.

How to Play

Master the art of Dots and Boxes with the simple rules:

  • Connect two dots either horizontally or vertically on your turn.
  • Completing the fourth side of a 1x1 box earns you a point and an extra turn.
  • The game concludes when all possible lines are drawn, and the player with the most completed boxes emerges victorious.

Game Controls

  • Input a string of 3 characters (e.g., "11u"), where the first two characters represent the row and column of the cell, and the third character ('u'/'b'/'l'/'r') denotes the direction (up/bottom/left/right) to insert the line.

Additional Features

Explore the game with these additional features:

  • Leaderboard: Check the leaderboard to see where you stand among the top 10 players. Track their names and scores for some friendly competition.

Leaderboard

See how your skills measure up against other players on the leaderboard. The top 10 players, along with their names and scores, are displayed for bragging rights.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages