Translate

Friday, December 13, 2013

Widgets

Lerpz Pseudocode Project

Main()



Start Main Menu



Lerpz()



Copper()



Spaceship()



EndGameMenu

























Class Lerpz()



String fuelCan String Respawn

String Heart String Ship

String Fence

num healthUp = 1

num fuelCell = 25

num totalLerpzHealth = 6

num totalLerpzLives = 4



if

Heart Collided

totalLerpzHealth = totalLerpzHealth + healthUp

end if



if

fuelCan Collided

fuelCell = fuelCell - 1

fuelCell < 1

Drop Fence around Ship

else

fuelCell = fuelCell - 1

endif



if

Lerpz Falls of Map && totalLerpzLives >= 1

Respawn

else

endGameLoose

if

Lerpz Collides with ship

Spaceship()

endif

if

Lerpz fights Enemy

Copper()

endif



endclass







class Copper()

num CopHit = 1 num totalLerpzLives = 4

num LerpzHit = 1

num totalCopHealth = 3

num totalLerpzHealth = 6

string fuelCell

string Heart

string Laser



if

Copper hits Lerpz

totalLerpzHealth = totalLerpzHealth - 1

totalHealth < 1 && totalLerpzLives < 1

Lerpz Dies

else

totalLerpzHealth = totalLerpzHealth - 1

endif



if

Copper is hit by Lerpz

totalCopHealth = totalCopHealth - 1

totalCopHealth < 1

Copper Dies

Drops random 0 to 3 {fuelCan, Heart}

else

totalCopHealth = totalCopHealth - 1

endif



if

after 10 seconds of dieing && out of Camera view

Disappear && respawn after Lerpz is out of range

endif



if

Lerpz is hit by Laser

totalLerpzHealth = totalLerpzHealth - 1

totalLerpzHealth < 1

Lerpz Dies

else

totalLerpzHealth = totalLerpzHealth - 1




endclass

Class Spaceship()



num fuelCell = 25

string Ship





if

Lerpz Collides with Ship && fuelCell > 1

Ship Takes off

End Game Winner

else

Spaceship does nothing

endif