Skip to content

Instantly share code, notes, and snippets.

@paujjone
Created February 22, 2018 04:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paujjone/e054b0b5180f5c228b3d9c9a583570ce to your computer and use it in GitHub Desktop.
Save paujjone/e054b0b5180f5c228b3d9c9a583570ce to your computer and use it in GitHub Desktop.
def updateplayer(player,**modification):
global players
selected = players[player]
if "Location" in modification:
selected["Location"] = modification["Location"]
if modification["Location"] = 30:
selected["InJail"] = 1
selected["Location"] = 10
players[player] = selected
if "InJail" in modification:
selected["InJail"] = modification["InJail"]
selected["Location"] = 10
if "JailMove" in modification: #Here
selected["JailMove"] = modification["InJail"]
players[player] = selected
def Jail(player):
rolls = dice()
if rolls[0]==rolls[1]:
roll = rolls[0] + rolls[1]
movement(player,roll)
updateplayer(player, InJail = 0)
else:
players[player]["JailMove"] += 1 . # Here
if players[player]["JailMove"] = 3:
updateplayer(player, JailMove += 1)
updateplayer(player, InJail = 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment