gatekeeper

Created by LeighandBecky

You need to download Java software in order to view this Alice world. Please visit this page: http://www.alice.org/applet/requirements/

Created with Alice, the easy-to-learn programming system. Provided free as a public service by Carnegie Mellon University


If you don't see 3d graphics on this page, click for help.

gatekeeper's Code

Created by:

world

Events

When the world starts
Do:
world.my first method


When is clicked on cleopatra
Do:
world.cleonew


When is clicked on ra
Do:
ra.ranew


When is clicked on anubis
Do:
world.anubisnew


When is clicked on pharaoh
Do:
world.pharoahnew


Methods

  world.my first method ( )
    No variables
       If ( ( anubis distance to penguin4 ) == 0 )
       You win! move to penguin5
  Else
  Do Nothing


  world.mummymove ( )
    No variables
     Do Nothing


  world.cleo ( )
    No variables
       If true
       Do together
       cleopatra move to penguin4
  ra move to penguin
  anubis move to penguin3
  pharaoh move to penguin2
  Else
    If true
       Do together
     Do Nothing
  Else
  Do Nothing


  world.clickra ( )
    No variables
       Do together
       cleopatra move to penguin3
  pharaoh move to penguin4
  anubis move to penguin
  ra move to penguin2


  world.anubiswin ( )
    No variables
       If true
       Do together
       cleopatra move to penguin2
  anubis move to penguin4
  pharaoh move to penguin
  ra move to penguin3
  Do in order
       anubis move to penguin4
  You win! move to penguin5
  Else
  Do Nothing


  world.pharaohclick ( )
    No variables
       Do together
       pharaoh move to penguin
  anubis move to penguin2
  ra move to penguin4
  cleopatra move to penguin3


  world.cleonew ( )
    No variables
       If ( ( cleopatra distance to penguin4 ) > 1 )
       Do together
       cleopatra move to penguin4
  pharaoh move to penguin
  ra move to penguin2
  anubis move to penguin3
  Else
    Do together
       ra move to penguin3
  pharaoh move to penguin4
  cleopatra move to penguin
  anubis move to penguin2


  world.pharoahnew ( )
    No variables
       If ( ( pharaoh distance to penguin4 ) > 1 )
       Do together
       pharaoh move to penguin4
  anubis move to penguin
  cleopatra move to penguin2
  ra move to penguin3
  Else
    Do together
       pharaoh move to penguin
  anubis move to penguin2
  cleopatra move to penguin3
  ra move to penguin4


  world.anubisnew ( )
    No variables
       If ( ( anubis distance to penguin4 ) > 1 )
       Do in order
       Do together
       anubis move to penguin4
  pharaoh move to penguin2
  ra move to penguin3
  cleopatra move to penguin
  You win! move to penguin5
  Wait 0.5 seconds
  mummy move to camera duration = 3.5 seconds
  Else
    Do together
       cleopatra move to penguin4
  pharaoh move to penguin3
  anubis move to penguin2
  ra move to penguin


Functions

  Object world.mummydistance ( )
    No variables
       If ( 3 == 3 )
     Do Nothing
  Else
  Do Nothing
Return <None>


  Number world.cleodistanceto ( [Obj] Cleopatra, [Obj] Ra, [123] minimumdistance)
    No variables
       If ( 2 > minimumdistance )
     Do Nothing
  Else
  Do Nothing
Return 1