Giter VIP home page Giter VIP logo

siege's Introduction

Marley

Turn based card game built using OOP in python pygame

Marley

Prerequisites

Setup

  • Python: Ensure you have Python installed. If not, you can download it from here.
  • pygame: This game requires pygame version 2.5.0.

After you clone this repo and install the prerequisites you can run main.py and try it out.

Or you can try it from the browser on my Replit.

Quickstart

# clone repo
git clone https://github.com/xBromsson/marley.git

# change directory
cd marley/

# install dependencies
python -m pip install -r requirements.txt

# run program
python main.py

# quit program
ctrl + c

Development

Python virtual environment

# create virtual environment
python -m venv .venv

# activate virtual environment
source .venv/bin/activate

# install dependencies
python -m pip install -r requirements.txt

Additional tooling

Additional tooling includes but is not limited to:

asdf

  • Install asdf

  • Usage

    # add python plugin
    asdf plugin-add python
    
    # install stable python
    asdf install python <latest|3.10.12>
    
    # set stable to system python
    asdf global python latest
    
    # add poetry asdf plugin
    asdf plugin-add poetry https://github.com/asdf-community/asdf-poetry.git
    
    # install latest version via asdf
    asdf install poetry <latest|1.5.1>
    
    # set latest version as default
    asdf global poetry latest

poetry

  • Install poetry if not using asdf

  • Usage

    # use venv in repo
    poetry config virtualenvs.in-project true
    
    # install dependencies
    poetry install
    
    # add new dependency
    poetry add <package>
    
    # remove dependency
    poetry remove <package>
    
    # activate virtual environment
    poetry shell
    
    # run program
    python main.py
    
    # exit virtual environment
    exit

vscode

  • Install vscode
  • Setup vscode settings
    • Handles debug settings for generic python programs as well as others (e.g., django, flask, etc.)

ruff

  • Installed via poetry or pip

  • Add VSCode plugin for ruff

    • Optional: disable pylance in favor of ruff in repo settings
      "python.analysis.ignore": [
        "*"
      ],
  • Usage

    # run linter
    ruff check .
    
    # run linter and fix issues
    ruff fix .
    
    # run tests
    ruff
    
    # run tests with coverage
    ruff --coverage
    
    # run tests with coverage and open in browser
    ruff --coverage --open

dependabot

  • Dependabot is a GitHub tool that automatically creates pull requests to keep dependencies up to date.

editorconfig

Handles formatting of files. Install the editorconfig plugin for your editor of choice.

๐Ÿ“œ License

This project is released into the public domain using The Unlicense - see the LICENSE file for details.

siege's People

Contributors

xbromsson avatar pythoninthegrass avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.