Giter Site home page Giter Site logo

nimgame's Introduction

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.

nimgame's People

Contributors

chris-jeune avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.