Skip to main content

Play the card game Baccarat

Project description

# PyBaccarat Play the card game Baccarat

To check out a copy of the source:

mkdir /github.com/fulkgl cd /github.com/fulkgl 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.

These programs have been built and tested with versions:

Python 2.7.13 Python 3.6.4

<h1>Updating this code</h1> <ol compact> <li>GIT (source control library). Check out a copy of the code. <br>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 <code>export BASE=/home/george</code> or Windows <code>set BASE=usersgeorge</code>. Windows will use <code>%BASE%</code> instead of <code>$BASE</code> and the back-slash for directory separator instead of forward slash. </li><ol compact> <li>mkdir $BASE/github.com/fulkgl</li> <li>chdir $BASE/github.com/fulkgl</li> <li>git clone https://github.com/fulkgl/PyBaccarat.git</li> </ol> <li>Clean up temp files.</li> <ol compact> <li>del /s/q build dist pybaccarat.egg-info</li> <li>rmdir /s/q build dist pybaccarat.egg-info</li> <li>del /s/q tests*.pyc pybaccarat*.pyc</li> </ol> <li>Build the code</li> <br>python setup.py build bdist sdist </ol>

Run unit tests:

cd base-location <br>python testsunittest_card.py <br>python testsunittest_shoe.py <br>python testsunittest_hand.py <br>python testsunittest_scoreboard.py

To check the coding standards and minor quality check:

cd base-location <br>pycodestyle pybaccaratplayingcards.py <br>pycodestyle pybaccaratbaccarat.py <br>pycodestyle pybaccaratbaccaratsystems.py <br>pycodestyle binplay_baccarat.py <br>pylint –rcfile=usrlocalbinpylint2.rc pybaccaratplayingcards.py <br>pylint –rcfile=usrlocalbinpylint2.rc pybaccaratbaccarat.py <br>pylint –rcfile=usrlocalbinpylint2.rc pybaccaratbaccaratsystems.py <br>pylint –rcfile=usrlocalbinpylint2.rc binplay_baccarat.py

To run the build and make distribution packages:

cd base-location <br>python setup.py sdist bdist_egg <br>rem dist/* contains source and binary distribution packages

<h2>Updating this code</h2> <ol compact>

<ol compact> <li><B>git clone https://github.com/fulkgl/PyBaccarat.git</B> <BR>This will make a copy of code from a remote host to local, 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.</li> <li><b>git status</b><BR>Shows you files missing from git and files that are changed.</li> <li><b>git diff README.md</B><br>Git diff will show you changed files differences. <li><b>git add README.md</b><br>Use the git add command to move changes from the working directory to the index. Files that are new from the repo are initially checked in with the git add command. Files that have been changed are also check 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.</li> <li><b>git commit -m “description”</b><br>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.</li> <li><b>git push origin master</b><br>Use the git push command to move changes from the head to the remote host.</li> <li>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.</li> <li><B>browser https://github.com/fulkgl/PyBaccarat</B> <br>See that the latest things look correct on the webpage.</li> </ol>

<br>twine upload dist/* -r legacy <li>update PiPy</li> <li>build, test, install</li> @rem python setup.py build bdist sdist upload </ol>

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

pybaccarat-0.18.tar.gz (210.8 kB view hashes)

Uploaded Source

Supported by

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