Skip to main content

A CLI sliding puzzle game

Project description

CLI Sliding Puzzle Game

A command-line interface sliding puzzle game built with Python.

Installation

To install the game, you need Python 3.7 or higher and pip. Then run:

pip install cli-sliding-puzzle

Playing the Game

After installation, run the game by typing:

sliding-puzzle

Use arrow keys to move tiles. Press 'q' to quit.

Development

Setup

  1. Clone the repository: git clone https://github.com/yourusername/cli-sliding-puzzle.git cd cli-sliding-puzzle

  2. Create a virtual environment: python -m venv venv source venv/bin/activate # On Windows, use venv\Scripts\activate

  3. Install development dependencies: pip install build twine setuptools_scm

Building and Publishing

  1. Ensure all changes are committed to git.

  2. List existing tags to determine the next version number:

    git tag --list
    
  3. Create a new git tag for the version:

    git tag -a vX.X.X -m "Release version X.X.X"
    git push origin vX.X.X
    
  4. Clean up the dist directory:

    rm -rf dist/*
    
  5. Build the package:

    python -m build
    
  6. Test the package locally:

    # List the contents of the dist directory
    ls dist/
    
    # Install the latest version (replace X.X.X with the latest version number you see)
    pip install dist/cli_sliding_puzzle-X.X.X-py3-none-any.whl
    
  7. Upload to TestPyPI:

    twine upload --repository testpypi dist/*
    
  8. Test the TestPyPI upload:

    # Create a new virtual environment for testing
    python -m venv test_venv
    source test_venv/bin/activate  # On Windows, use `test_venv\Scripts\activate`
    
    # Install the package from TestPyPI
    pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple cli-sliding-puzzle
    
    # Test the installed package
    sliding-puzzle
    
    # Deactivate the test environment when done
    deactivate
    
  9. If everything works, upload to PyPI:

    twine upload dist/*
    

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cli_sliding_puzzle-0.1.4.post0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cli_sliding_puzzle-0.1.4.post0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file cli_sliding_puzzle-0.1.4.post0.tar.gz.

File metadata

File hashes

Hashes for cli_sliding_puzzle-0.1.4.post0.tar.gz
Algorithm Hash digest
SHA256 1f4049a6218862216c05a3fd525b0f7d5de7db5923bb706316e0e3a5c5e720fd
MD5 dc7262b4662428e0f81fdce2309a5e3a
BLAKE2b-256 3fb6758af83c861cf4d4791a175de002304bee1158a3b0fb6334e0b1ff3aade0

See more details on using hashes here.

File details

Details for the file cli_sliding_puzzle-0.1.4.post0-py3-none-any.whl.

File metadata

File hashes

Hashes for cli_sliding_puzzle-0.1.4.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 1fbe0158cb6cecb6ec73168640f2503264426f46344119b1b31d69332df62a2f
MD5 0d187d6fab534a3115dedc70a5c6d72f
BLAKE2b-256 872f1576fc9392fcccd073c6ee77d5818c182e94b305c6ddab4e5706cd458988

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page