Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 1.72 KB

README.md

File metadata and controls

42 lines (27 loc) · 1.72 KB

Nim Game

A JavaFX application for the classic Nim game, featuring an AI opponent implemented using the MinMax algorithm with AlphaBeta pruning and Memoization.

Main Menu

About

Nim is a two-player, turn-based, mathematical game where players remove objects from distinct heaps. The goal is to force the opponent to remove the last object. This application enhances the traditional gameplay with an intelligent AI opponent capable of making strategic decisions.

Features

  • Interactive Gameplay: Play against an AI with strategic depth, powered by the Alpha-Beta pruning algorithm.
  • Multiple Difficulty Levels: Choose between Easy, Medium, Hard, and Perfect levels to match your skill.
  • Game Modes: Choose from 'Classic' or 'Misère' for different game versions.
  • Multiplayer: Free Play mode allows for two players.

Installation

To run this Nim game application, ensure you have Java and JavaFX installed on your system.

  1. Clone the repository.
  2. Navigate to the project directory.
  3. Compile and run the java application.

How to Play

  • Start the game from the main menu and select your preferred difficulty level and game mode.
  • The objective is to be the player who does not take the last object from the piles.
  • On your turn, choose a pile and remove a number of objects.
  • Outsmart the AI and try to be the ultimate Nim champion!

Misere Setup

Misere Setup Single-player

Classic Setup

Classic Setup Multiplayer