cemanughian / PyBaccarat

Play the card game Baccarat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyBaccarat

Play the card game Baccarat

To check out a copy of the source: git clone https://github.com/fulkgl/PyBaccarat.git

This is an implementation of the card game Baccarat. It includes the code needed to play a game interactively, replay a historical game, or play a game with a particular system.

This code has been built and tested with these versions: Python 2.7.13 Python 3.6.4

Updating this code

  1. GIT (source control library). Check out a copy of the code.
    To keep the origin and structure of the code obvious, I start with a $BASE (%BASE%) location. It can be a location of your choosing. Assign an environment variable to define the starting base location: in Linux export BASE=/home/george or Windows set BASE=\users\george. Windows will use %BASE% instead of $BASE and the back-slash for directory separator instead of forward slash.
    1. mkdir $BASE/github.com/fulkgl
    2. chdir $BASE/github.com/fulkgl
    3. git clone https://github.com/fulkgl/PyBaccarat.git


    The command git clone https://github.com/fulkgl/PyBaccarat.git will make a copy of code from a remote host to local system, setting up 3 trees (working directory, index, and head). What you normally see is the working directory. The index and head trees are inside the .git directory. And you don't normally look at them.
    git status
    Shows you files missing from git and files that are changed.
    git diff README.md
    Git diff will show you changed files differences.
    git add README.md
    Use the git add command to move changes from the working directory to the index. Files that are new to the repo are initially checked in with the git add command. Files that have been changed are also checked in this way. You often use git add one file at a time since you specify each file with this command. Use "git reset file" to reverse the effects of a git add command.
    git commit -m "description"
    Use the git commit command to move changes from the index to the head. You will do this for all the git added files once. Use "git checkout" to reverse the effects of a git commit. The description should contain a reference to the defect or feature number that is addressing this code change.
    git push origin master
    Use the git push command to move changes from the head to the remote host.
    git init is used to create a new repo the first time. Also a git remote add origin is used the first time to associate a connection to the remote host.
    browser https://github.com/fulkgl/PyBaccarat
    See that the latest things look correct on the webpage.

  2. Clean up temp files.
    1. del /s/q build dist pybaccarat.egg-info
    2. rmdir /s/q build dist pybaccarat.egg-info
    3. del /s/q tests\*.pyc pybaccarat\*.pyc
    4. rmdir pybaccarat\__pycache__
  3. Build the code

  4. python setup.py build bdist sdist
  5. Run the unit tests
  6. cd %BASE%\github.com\fulkgl\PyBaccarat
    python tests\test_card.py
    python tests\test_hand.py
    python tests\test_scoreboard.py
    python tests\test_shoe.py
    python tests\test_ties.py
    

About

Play the card game Baccarat

License:MIT License


Languages

Language:Python 100.0%