Skip to content

A nim game with player vs player and player vs computer option

Notifications You must be signed in to change notification settings

chris-jeune/NimGame

Repository files navigation

Nim Game

Overview

The Nim Game is a classic two-player strategic game. It is played with a set of heaps, each containing a certain number of objects (usually represented as tokens). Players take turns removing objects from the heaps according to certain rules, with the goal of forcing their opponent to remove the last object.

This project implements the Nim Game in C++.

Features

  • Two game modes: User vs. User and PC vs. User.
  • User-friendly interface with clear instructions and prompts.
  • Error handling for invalid user inputs.
  • Recursive option for continuous gameplay until the user chooses to exit.
  • Supports both French and English languages.

Game Rules

  1. The game starts with a set of heaps, each containing a certain number of tokens.
  2. Players take turns removing one or two tokens from a single heap.
  3. The player who removes the last token wins the game.
  4. The game can be played with two human players or against the computer.

Getting Started

To play the Nim Game, follow these steps:

  1. Clone the repository to your local machine.
  2. Compile and run the source code using a C++ compiler.
  3. Follow the on-screen instructions to choose the game mode and start playing.

About

A nim game with player vs player and player vs computer option

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages