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" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
</component>
</module>
\ 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>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 2.7" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/POOker.iml" filepath="$PROJECT_DIR$/.idea/POOker.iml" />
</modules>
</component>
</project>
\ 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" />
</component>
</project>
\ No newline at end of file
This diff is collapsed.
class Player:
# INIT
def __init__(self):
self.__hand = Hand()
self.__chips = float
self.__cards = [Cards()]
self.__chipsOnTable = float
self.position = int
self.isPlaying = bool
self.isAllIn = bool
# GETTERS & SETTERS
@property
def chipsOnTable(self):
return self.__chipsOnTable
@chipsOnTable.setter
def chipsOnTable(self, value):
self.__chipsOnTable = value
@property
def chips(self):
return self.__chips
@chips.setter
def chips(self, value):
self.__chips = value
# PRIVATE METHODS
# PUBLIC METHODS
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