A JavaFX application for the classic Nim game, featuring an AI opponent implemented using the MinMax algorithm with AlphaBeta pruning and Memoization.
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.
- Interactive Gameplay: Play against an AI with strategic depth, powered by the Alpha-Beta pruning algorithm.
- Multiple Difficulty Levels: Choose between
Easy
,Medium
,Hard
, andPerfect
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.
To run this Nim game application, ensure you have Java and JavaFX installed on your system.
- Clone the repository.
- Navigate to the project directory.
- Compile and run the java application.
- 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!