MCPcopy Create free account
hub / github.com/geekcomputers/Python / snake

Function snake

BoardGame-CLI/snakeLadder.py:118–137  ·  view source on GitHub ↗
(c, i)

Source from the content-addressed store, hash-verified

116
117# snake bite code
118def snake(c, i):
119 if c == 32:
120 players[i] = 10
121 elif c == 36:
122 players[i] = 6
123 elif c == 48:
124 players[i] = 26
125 elif c == 63:
126 players[i] = 18
127 elif c == 88:
128 players[i] = 24
129 elif c == 95:
130 players[i] = 56
131 elif c == 97:
132 players[i] = 78
133 else:
134 return players[i]
135 print(f"You got bitten by a snake now you are at {players[i]}")
136
137 return players[i]
138
139
140# ladder code

Callers 1

moveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected