Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Object Oriented Nim

This is a console-based implementation of the classic Nim game written in C++. It supports both human players and AI opponents, including a random-move bot and a strategically optimal bot.

The game allows custom board setups and provides a clean, visual representation of the current board state in the console.


Features

  • Customizable board: Players can define the number of rows and objects per row. Defaults to [3, 5, 7].
  • Multiple player types:
    • Human player
    • Random-move AI bot
    • Strategically optimal AI bot (implements the Nim optimal strategy using XOR/Nim sum)
  • Turn-based gameplay with automatic validation of moves.
  • Interactive console interface with board display using stars for objects.
  • 1v1 or human vs bot gameplay.

How to Play

  1. Run the program:
    ./main

About

This repository is an Object Oriented Programming based Nim game written in C++

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages