delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/09/19:40:47

From: pjotr AT wlink DOT net (pjotr)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: making a snake grow
Date: Sun, 10 Jan 1999 00:15:35 GMT
Organization: Posted via RemarQ, http://www.remarQ.com - Discussions start here!
Lines: 19
Message-ID: <3697f0bf.6123846@news.w-link.net>
References: <369767d4 DOT 18850738 AT news DOT freeserve DOT co DOT uk> <MPG DOT 110188dcd34af60a98a03c AT news DOT freeserve DOT net>
NNTP-Posting-Host: 208.151.227.206
X-Trace: 915927754 T.3QWX1FWE3CED097C usenet80.supernews.com
X-Complaints-To: newsabuse AT remarQ DOT com
X-Newsreader: Forte Free Agent 1.11/32.235
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Sat, 9 Jan 1999 16:31:34 -0000, arganoid AT fatal-design DOT com (Andrew
R. Gillett) wrote:

>In comp.os.msdos.djgpp, Ben Dowling wrote:
>> Hi,
>> 
>> I am writing a game called wormies, it is a snake
>> clone, but I don't know how to make the snake
>> grow! Could any one help me?
>
>How far have you got with the game so far? Presumably you must have a 
>variable which contains the length of the snake, otherwise how do you 
>know how much snake to draw on the screen?

Wouldn't a simple array be sufficient? where snakepos[0] holds the
snake's head position and snakepos[length_of_snake] holds the tail.

Pjotr

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019