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: RE: Card's Game
From: "Alain Tougas" <alain@xxxxxxx>
Date: Wed, 7 Feb 2007 09:53:32 -0500

Hi,
I didn't look at your project, but I can tell immediately that
first flippedcards, ht
won't work. The "comma" trick works with turtle names only. The proper way
to achieve what is inteded by this instruction would be:
ask first flippedcards [ht]
or
ask first flippedcards [setsh 16]
That is similar to
ask "t1 [ht]

Alain
  -----Original Message-----
  From: mwforum-admin@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
[mailto:mwforum-admin@xxxxxxxxxxxxxxxxxxxxxxxxxxxx]On Behalf Of zehava
wizman
  Sent: February 7, 2007 9:40 AM
  To: mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
  Subject: RE: [MWForum] Card's Game


  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:
    Hi,
    To get the names of the turtles:
    GET "PAGE1 "TURTLES
    Use your page name instead of PAGE1
    Best,
    Alain
      -----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: [MWForum] 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:
        Hello,


        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
        flipcard
        ; if the card you just flipped is the second flipped card...
        if (count flippedcards) = 2 [compare]
        end


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


        to compare
        ; compare the shape of the two flipped cards
        ifelse (ask first flippedcard [shape]) = (ask last flippedcard
[shape])
           [?whatevershouldhappen_ifmatch?]
           [?whatevershouldhappen_ifnomatch?]
        ; reset the list of flipped cards to "empty"
        setflippedcards [ ]
        end


        Alain Tougas
        alain@xxxxxxx
        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
      http://mail.yahoo.com




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

  • Previous by thread: RE: Card's Game
  • Next by thread: Saving MWJr Projects to the web

  • 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