Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #50762

Re: Help with pygame

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.044
X-Spam-Evidence '*H*': 0.91; '*S*': 0.00; 'currently,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:Help': 0.11; 'jan': 0.12; 'excludes': 0.16; 'googling': 0.16; 'once.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'top:': 0.16; 'wrote:': 0.18; 'header:User- Agent:1': 0.23; 'daniel': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; "i'm": 0.30; 'easier': 0.31; '(including': 0.33; 'subject:with': 0.35; 'something': 0.35; 'but': 0.35; 'scheme': 0.36; 'to:addr:python- list': 0.38; 'pm,': 0.38; 'little': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'above,': 0.60; 'received:173': 0.61; 'simple': 0.61; 'making': 0.63; 'pick': 0.64; 'more': 0.64; 'bottom': 0.67; 'upper': 0.74; 'game,': 0.84; 'inclusive': 0.84; 'order:': 0.84; 'received:fios.verizon.net': 0.84; 'snake': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: Help with pygame
Date Tue, 16 Jul 2013 20:10:12 -0400
References <a18a24bf-7cbf-43ef-81a0-c13e7d812b35@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host pool-173-75-251-66.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7
In-Reply-To <a18a24bf-7cbf-43ef-81a0-c13e7d812b35@googlegroups.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4785.1374019827.3114.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1374019827 news.xs4all.nl 15951 [2001:888:2000:d::a6]:54058
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:50762

Show key headers only | View raw


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 | NextPrevious in thread | Find similar | Unroll thread


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