In [1]:
from calc import Total, PointHolder
In [2]:
score = (
{'points': 12, 'fine': 8, 'whists': [12, 4, 2]},
{'points': 6, 'fine': 4, 'whists': [4, 0, 24]},
{'points': 10, 'fine': 4, 'whists': [8, 0, 4]},
{'points': 4, 'fine': 0, 'whists': [0, 12, 8]},
)
total = Total([PointHolder(i + 1, **score[i]) for i in range(len(score))])
total.calculate()
Out[2]:
In [2]: