Project Folders
Teacher Resources
Student Resources
How Do I?
Site Map
Our Team

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

[Thread Prev] [Thread Next]

To: mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Subject: RE: Card's Game
From: zehava wizman <zehavawi1@xxxxxxxxx>
Date: Wed, 7 Feb 2007 06:39:48 -0800 (PST)

Hello Alain!
  I tried it, and didnt succeeded. the list of projectvar is not created. I 
send you the project.
  When the "compare"  procedure findsthat 2 cards are equal I want it to hide 
the two cards, so it doesn't work like first flippedcards, ht  or last 
flippedcards, ht 9like we do t1, ht)
  If  they are not equal, I want them to  change their shape to setsh 16 (its 
there back)
                                   Thanks for your help, Zehava          

Alain Tougas <alain@xxxxxxx> wrote:
  To get the names of the turtles:
  Use your page name instead of PAGE1
    -----Original Message-----
From: mwforum-admin@xxxxxxxxxxxxxxxxxxxxxxxxxxxx [mailto:mwforum-admin@xxxxxxxxxxxxxxxxxxxxxxxxxxxx]On Behalf Of zehava wizman
Sent: January 9, 2007 2:02 PM
To: mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Subject: Re: Card's Game

  Hello Alain!
  I understand the problem with turtlesown, and I fixed it.
  to the second question- to identify whether the two cards are the same' I 
want to do it more simple, but I didnt succeeded to get the names of the 
turned turtle, Is there an instruction to get the names of the tutrles  like  
get pos , get rule and so on.
  there will be a procedure "right" that will get the name of the two turtles 
and thenhide them' and another button "wrong" that will turn the cards to 
their opposite side.
                                  Thanks, Zehava Wizman

Alain LCSI <alain@xxxxxxx> wrote:

  Turtlesown is a command that you use "only once" in a given project. Once 
done, you never have to do it again, the variable is created. After a 
TURTLESOWN "TRY command, you can use SETTRY and TRY instructions as much as 
you want. Your STARTUP procedure tries to "recreate" the variable and it 
already exists. That's why you have an error message.

  Solution: remove the TURLTESOWN command in your startup procedure. You don't need it at this point.

  About finding pairs: You can take a look at the project PAIRS in the project 
library (MW JR area at www.microworlds.com). It is a MW JR project. You can 
see it in your browser if you have the MicroWorlds EX plugin for Macintosh 
(Windows to come later)

  One way to check if two flipped cards have the same shape (with lots of 
"unknown" that I leave to you)

  ; run this once to create the project variable
  createprojectvar "flippedcards


  ; the Onclick instruction of every card: FLIPANDCHECK

  to flipandcheck
  ; if the card you just flipped is the second flipped card...
  if (count flippedcards) = 2 [compare]

  to flipcard
  ; put the name of the current turtle in the list of flipped cards
  setflippedcards fput who flippedcards
  setsh ?whatever?

  to compare
  ; compare the shape of the two flipped cards
  ifelse (ask first flippedcard [shape]) = (ask last flippedcard [shape])
  ; reset the list of flipped cards to "empty"
  setflippedcards [ ]
    Alain Tougas
  B: (514) 939-8700 poste 237

    Le 07-01-07 à 08:53, zehava wizman a écrit :

    Hello Forum!
  Here attached a project using turtlesown instruction.
  1. Why there is an error message about it?
  2/ How can I build a procedure that check if after clicking 2 cards- their 
shapes are the same, If not - it turned side, till we guess all the pairs in 
the game.
  I tried to use the values of turtlesown , but it didnt work.
                     Thanks, Zehava Wizman
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com   <cards1.rar>

Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 

Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.

Attachment: cards_problem.rar
Description: 1637614995-cards_problem.rar

  • Previous by thread: Re: Card's Game
  • Next by thread: RE: Card's Game

  • 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