Skip to content

dliu84/Python-Board-Game

Repository files navigation

2D Board Game with Minimax AI (Python)

Overview

This is a 2D board game implemented in Python using pygame.

  • Player 1 starts with a gem in the top-left corner; Player 2 starts in the bottom-right corner.
  • Players take turns adding gems. Gems overflow to neighbors following specific rules.
  • The game ends when all gems are the same color; the player of that color wins.

Features

  • Custom overflow logic to manage gem spreading across the board.
  • Evaluation function to score board states for AI decision-making.
  • Game tree implementation using a minimax algorithm for optimal moves.
  • Supports multiple levels of AI difficulty by adjusting tree depth.

Highlights

  • Designed using object-oriented programming.
  • Implemented AI bots using evaluation functions and minimax strategy.
  • Demonstrates game logic, algorithms, and Python programming skills.

Technologies

  • Python 3.x
  • pygame (for graphical interface)
  • Algorithms: Game tree, Minimax, Evaluation functions

How to Run

  1. Install pygame: Pygame Installation
  2. Run the game:
python game.py

Contributors

  • Professor Reza Khojasteh (Instructor, Seneca Polytechnic, DSA456, 2023 Fall)
  • Di Liu - dliu84
  • Henry Luong - lluong7
  • Techatat Obun - tobun

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages