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

Method setSides

diceV2_dynamic.py:9–16  ·  view source on GitHub ↗
(self, sides)

Source from the content-addressed store, hash-verified

7 self.sideCount = 6
8
9 def setSides(self, sides):
10 if sides > 3:
11 self.sides = sides
12 else:
13 print(
14 "This absolutely shouldn't ever happen. The programmer sucks or someone "
15 "has tweaked with code they weren't supposed to touch!"
16 )
17
18 def roll(self):
19 return random.randint(1, self.sides)

Callers 1

getDicesFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected