Skip to content

HelloWorld-er/Twenty-Four-Puzzle-in-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twenty-Four-Puzzle-in-Python

Description

A classical mathematical game made by Python (includes tkinter)

Intro (Game Rule)

The 24 Game is an arithmetical card game in which the objective is to find a way to manipulate four integers so that the end result is 24.

The game is played with a deck of 52 cards, each card has a number from 1 to 13, and four cards are drawn.

The game is played by rearranging the numbers and using the four basic arithmetic operations (+, -, *, /) to form an expression that equals 24.

Set Up

  1. Install a Python Interpreter: Install python interpreter in the Python Official Website if you do not have
  2. Navigate to the working directory: open terminal and navigate to the working directory
  3. Create the Virtual Environment: Use Python's venv module to create a virtual environment. You can name the environment anything you like, commonly venv or env
    python -m venv venv
  4. Activate the Virtual Environment:
    • On Windows:
      venv\Scripts\activate
    • On Unix or MacOS:
      source venv/bin/activate
  5. Install Requirements: With the virtual environment activated, use pip to install all the necessary packages listed in the requirements.txt file:
    pip install -r requirements.txt
  6. Deactivating the Virtual Environment: Once you're done working, you can deactivate the virtual environment:
    deactivate

License

This project is licensed under the MIT License - see the LICENSE file for details.