Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #50762
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Subject | Re: Help with pygame |
| Date | 2013-07-16 20:10 -0400 |
| References | <a18a24bf-7cbf-43ef-81a0-c13e7d812b35@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4785.1374019827.3114.python-list@python.org> (permalink) |
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
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Help with pygame Daniel Kersgaard <danielkersgaard@gmail.com> - 2013-07-16 10:29 -0700
Re: Help with pygame Chris Angelico <rosuav@gmail.com> - 2013-07-17 04:16 +1000
Re: Help with pygame Daniel Kersgaard <danielkersgaard@gmail.com> - 2013-07-16 11:33 -0700
Re: Help with pygame Dave Angel <davea@davea.name> - 2013-07-16 14:58 -0400
Re: Help with pygame Terry Reedy <tjreedy@udel.edu> - 2013-07-16 20:10 -0400
csiph-web