This is Magic Square, a Python puzzle game challenging your strategic thinking. Choose a grid, manipulate it to make each row and column sum to 0. There are multiple starting grids, with a limited number of turns per board. You can change only one spot per turn. The program will generate 2 images each game to record your progress. Good luck!
-
Board Selection: Choose from four different game boards, each a grid with its own set of initial numbers, dimensions, and maximum number of turns to solve.
-
Scoring System: Game keeps track of how many boards you have cleared and the total number of turns it took you to to get this score.
-
Custom Images: Two images are generated and saved based on the game board for each playthrough, allowing you to keep a catalogue of past rounds.
-
Python 3.x
-
Modules:
numpy
andpygame
Follow these steps to set up and run the Magic Square Puzzle game in python:
-
Clone the repository to your local machine:
git clone https://github.com/Daksh2060/magic-square-puzzle-python.git
-
Install
numpy
andpygame
if not already installed:-
numpy: Install numpy with pip
-
pygame: Install pygame with pip
-
-
Run
magicSquare.py
to start the game.
-
Choose a game board: Select a game board by entering a number from 1 to 4.
-
Pick a spot on the board: Choose a value to change by inputing its row and column.
-
Change value: Choose a value between -9 and 9 to change value.
-
Win condition: Achieve a win by making the sum of each row and column equal to zero within the turn limit.
-
Scoring: Earn points for boards won.
-
Past game catalogue: The final board of each game is saved as a generated image.
-
Play again: You can quickly start a new game if you choose to play again.
-
Exit game: You can exit Magic Square Puzzle between games or during a round.
Feel free to reach out if you have any questions, suggestions, or feedback:
- Email: [email protected]
- LinkedIn: @Daksh Patel