Coverage for zombie_nomnom/models/__init__.py: 100%
3 statements
« prev ^ index » next coverage.py v7.6.8, created at 2024-12-05 01:14 +0000
« prev ^ index » next coverage.py v7.6.8, created at 2024-12-05 01:14 +0000
1"""
2Models
3===
5We contain the following models for the core of the game.
7[`DieBag` information found here](models/bag#DieBag)
8```python
9from zombie_nomnom.models import DieBag, Die, DieColor, Face
12# The core of the models is the bag which is our custom
13# collection that contains the code to select dice from the bag.
14# It allows us to manage
15bag = DieBag(
16 dice=[
17 Die(
18 faces=[
19 Face.BRAIN,
20 Face.BRAIN,
21 Face.BRAIN,
22 Face.SHOTGUN,
23 Face.SHOTGUN,
24 Face.SHOTGUN
25 ]
26 )
27 ]
28)
29```
31[`Die` information found here](models/dice#Die)
32```python
33from zombie_nomnom.models import Die
36# Model to keep track of and roll the die we have
37# defined in the game.
39custom_die = Die(
40 faces=[
41 Face.BRAIN,
42 Face.BRAIN,
43 Face.BRAIN,
44 Face.SHOTGUN,
45 Face.SHOTGUN,
46 Face.SHOTGUN
47 ]
48)
50```
51"""
53from .bag import DieBag
54from .dice import Die, DieColor, Face
56__all__ = [
57 "DieBag",
58 "Die",
59 "DieColor",
60 "Face",
61 "bag",
62 "dice",
63]