Help with pygame

Terry Reedy tjreedy at udel.edu
Tue Jul 16 20:10:12 EDT 2013


On 7/16/2013 1:29 PM, Daniel Kersgaard wrote:
> I'm having a little trouble, tried Googling it, but to no avail.
 > Currently, I'm working on making a snake game, however
 > I'm stuck on a simple border.

To give a variation of the other answers, it would be easier if you drew 
the four sides more symmetrically, in something like the following order:

top (including both top corners)
bottom (including both bottom corners)
left (omitting both left corners)
right (omitting both right corners)

Including the corners with the sides instead of the top and bottom would 
be okay. So would be including one (different) corner with each line. 
Just pick a scheme that does each one once. Using the above, if 0, 0 and 
X, Y are upper left and bottom right corners,
and we use inclusive ranges:

top: 0, 0 to X, 0  # includes corners
bot: 0, Y to X, Y  # includes corners
lef: 0, 1 to 0, Y-1   # excludes corners
rit: X, 1 to X-1, Y-1 # excludes corners

-- 
Terry Jan Reedy




More information about the Python-list mailing list