本文整理汇总了Python中actor.Actor.points["total"]方法的典型用法代码示例。如果您正苦于以下问题:Python Actor.points["total"]方法的具体用法?Python Actor.points["total"]怎么用?Python Actor.points["total"]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类actor.Actor
的用法示例。
在下文中一共展示了Actor.points["total"]方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Actor
# 需要导入模块: from actor import Actor [as 别名]
# 或者: from actor.Actor import points["total"] [as 别名]
choices.append(generator.choose("skills"))
print "==CHOICES=="
for choice in choices:
print "- %s (%s points)" % choice
print ""
print "Random actor generation test:"
# Import necessary classes.
from actor import Actor
# Generate a dummy actor
actor = Actor()
actor.points["total"] = 50+r3d6()
# Spend points!
spent = spend_points(actor, generator)
# Store spending:
actor.points["skills"] = spent
for choice, points in actor.points["skills"].items():
print "%s - %s points" % (choice, points)
print "-"*20
print "SUM: %s" % sum(actor.points["skills"].values())
print ""
print "Random actor improvement test:"