Chris Angelico <ros...@gmail.com> writes: > Ben Finney <ben+pyt...@benfinney.id.au> wrote: > > This resulted in a library for rolling dice in different > > combinations, and looking up result tables > > <URL:https://pypi.python.org/pypi/alea>. > > Fun fun! Of course, when I hear "rolling dice in different > combinations", my mind immediately turns to Dungeons and Dragons, > where it's plausible to roll d20+7, then roll 2d8+d6+12 to figure out > how much damage you did...
Yeah, and lots of board games use custom dice with faces specific to that game (symbols, non-consecutive numbers, etc.), so the Die class allows the faces to be any object the application needs. > But the hard part of board games is usually the board. A lot of the board games I'm intrigued by don't have much of a board; they use custom cards and tokens and (maybe) dice, and the “board” is an abstraction of where all the pieces are on the table. > I used to spend ages trying to draw up a half-decent board, and ended > up giving up. By "simulate", I'm guessing you mean that you didn't > actually draw anything of the sort? Right. The (never completed) application was to simulate the mechanics of that particular game so I could see how it would play out, not be an interactive playable game. I've long been aware there is an enormous amount of UI-programming work involved with interactive playable games. My ambition for that work was quenched from attempting it in my teenage years :-) -- \ “With Lisp or Forth, a master programmer has unlimited power | `\ and expressiveness. With Python, even a regular guy can reach | _o__) for the stars.” —Raymond Hettinger | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list