[Thread Prev] [Thread Next]
On 28 Aug 2005 at 23:03, Ask an Expert - Question wrote:
> This is an automatic message sent from the web form at:
> from: Andrea Duran <aduran@xxxxxxxxxxxxxxxxxxxxx>
> date: Fri Aug 26 16:51:43 2005
> I'm attempting to make my own pacman game. I figured the
> only way I could program the turtle to eat the black lines
> I drew was to use colorunder. It works just fine but is
> there a way I can program the game to know when there is no
> more black on the screen and move on to the next level
> (next page).
This is a totally different approach. (project attached)
Each cookie is a turtle. Each cookie runs "eaten" many times.
When a cookie is touched by pacman it makes a sound, it
hides itself and it decreases the value of cookies, when
the variable "cookies" becomes 0, we know that every cookie
has been eaten.
The code is below:
make "cookies 7
if touching? who "pacman [
make "cookies :cookies - 1
if :cookies = 0 [
announce [next level!]
Description: Binary data
Previous by thread:
Re: MIA, Ask an Expert: pacman
Next by thread:
MIA, Ask an Expert: pacman
To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.