Home
Project Folders
Teacher Resources
Student Resources
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

To: mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Subject: Introduction and keeping score
From: Chris Forkner <cforkner@xxxxxxxxxxxxxxx>
Date: Sun, 18 Dec 2005 13:43:04 -0500

Hi MWforum,
My name is Christine Forkner . I teach at HCES in NYC. I've been enjoying MicroWorlds since it was a logo triangle. I love MicroWorlds Ex. My students are exporting turtles and sharing ideas right and left. Recently a student asked me how to keep the score with the player's name. It was the last 5 minutes of class, people were saving... forgetting to save... I told him I'd get back to him I'm always learning and have so much to learn still.
The answer to this one is so simple:
make "something list :name score I chose to make "newest list name score This reminds me that this is the name and score of the current player.


then you can pr :something anywhere you want. I used high_scorers, ct pr :newest

Attached is a MicroWorlds EX project that demonstrates keeping score with the players' names.
If you're using Pro or MW2 it will work also
To use these procedures, you'll need 4 textboxes
two to hold names
PLAYERS
High_Scorers
two to hold numbers ... for these you must put a number in each before you start.
SCORE
HiSCORE



To test it out, create a button for getname and a button for TALLY.
Artificially raise and lower the score to test things. Once the score keeping is working, add it to one of your mazes or build another game.
I'd love to know how students build on this. Here are the procedures I used.
(addtoscore isn't used here.. it's for later when there is some game with which to earn points.
Christine


TO GETNAME
	question[What is your name?]
	make "name answer
	ifelse member? :name players
		[welcomeback]   [  addtolist   ]

end
to gn
	getname
end
to WELCOMEBACK

	Announce (se [Welcome back,] :name [.])
end
to ADDtoLIST

	players, top pr :name
announce (se [Good luck] :name [!])
end
TO ADDtoSCORE
  setscore score +10
 end
TO TALLY
  make  "newest list :name score
  if  score > hiscore  [best ]
  if score = hiscore  [tied ]
  if score < hiscore [try]
end
TO BEST
SEThiscore score
High_Scorers, ct pr :newest
announce (se [Congratulations,] :name [you are the high scorer in this game!])

end
TO TIED
high_scorers, top pr :newest
announce (se [Congratulations,] :name [you tied for high score!])
end
TO TRY
announce (se [Your score is ] score
 [. Try again next time,] :name[. The high score is] hiscore[.])

end

Attachment: %HISCORE.mwx
Description: application/applefile

Attachment: HISCORE.mwx
Description: Binary data


  • Previous by thread: Re: Logo Interactive Fiction Engine ( L.I.F.E. )
  • Next by thread: Hullo

  • 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.


    © copyright 2001 - 2008