Skip to content

mayankchouhan263-crypto/SOS_Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

SOS_Game

This is a simple SOS Game made using Python and Pygame. The game is Player vs AI, where the AI uses the Minimax algorithm to choose moves.

I first created this game in Java and then converted it to Python to better understand game logic and artificial intelligence.


GAME RULES

  • Players place S or O on the board
  • If a player forms S-O-S, they get 1 point
  • If a player scores, they get another turn
  • The game ends when the board is full
  • Player with the highest score wins

FEATURES

  • 5x5 board
  • Player vs AI
  • Minimax algorithm for AI
  • Keyboard controls
  • Score tracking
  • Extra turn on scoring
  • Simple UI using pygame

CONTROLS Arrow Keys : Move selection S : Place S O : Place O Enter : Confirm move


HOW TO RUN

  1. Install Python https://www.python.org/downloads/

  2. Install pygame pip install pygame

  3. Run the game python main.py


PROJECT STRUCTURE sos-game/ | |-- main.py |-- README.txt


WHAT I LEARNED

  • How board games are implemented
  • How minimax algorithm works
  • Game loop and event handling
  • Keyboard input handling
  • AI decision making
  • Converting Java logic to Python

FUTURE IMPROVEMENTS

  • Mouse support
  • Restart button
  • Difficulty levels
  • Better graphics
  • Bigger board size
  • Add Animation for Point Scored

AUTHOR Mayank Chouhan Beginner Python & AI learner


About

SOS Game in Python using pygame with Minimax AI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages