Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit cca8c2ad authored by Arnaud Chevalier's avatar Arnaud Chevalier

player class

parent 2d0d7a8b
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 2.7" project-jdk-type="Python SDK" />
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<module fileurl="file://$PROJECT_DIR$/.idea/POOker.iml" filepath="$PROJECT_DIR$/.idea/POOker.iml" />
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
\ No newline at end of file
This diff is collapsed.
class Player:
def __init__(self):
self.__hand = Hand()
self.__chips = float
self.__cards = [Cards()]
self.__chipsOnTable = float
self.position = int
self.isPlaying = bool
self.isAllIn = bool
def chipsOnTable(self):
return self.__chipsOnTable
def chipsOnTable(self, value):
self.__chipsOnTable = value
def chips(self):
return self.__chips
def chips(self, value):
self.__chips = value
def endTurn(self):
ans = self.chipsOnTable
self.__chipsOnTable = 0
return ans
def giveSB(self, smallBlind):
self.chips -= smallBlind
self.chipsOnTable += smallBlind
def giveBB(self, bigBlend):
self.chips -= bigBlend
self.chipsOnTable += bigBlend
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment