[Tutor] OOP Advice
Daniel Yoo
dyoo@hkn.eecs.berkeley.edu
Wed, 7 Mar 2001 20:00:38 -0800 (PST)
On Wed, 7 Mar 2001, JRicker wrote:
> Shudder is right. My advanced math is kind of weak and so I wouldn't
> come up with that on my own. I appreciate the tip. At the risk of
> keeping this a little offtopic, I have to ask, does anyone know how do a
> range function for a hex based map?
Clarification needed: do you mean "range" as in distance between points on
a hex grid, or "range" as in a Python range object?
###
>>> range(5)
[0, 1, 2, 3, 4]
###
Words, words, words.
> I'm actually using a hex based map which means each direction is left
> to right 60 degrees. Will this still work?
We might need to be more careful; I didn't consider a hex map. Your other
scheme, then, might be better. I was thinking of something free-floating.