Last active
September 24, 2016 07:27
-
-
Save chikien276/6a1892ed96e6d510c98519cd16162920 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class plant{ | |
id: string; | |
damage: int; | |
hp: int; | |
attack: int; | |
attkSpeed: int; | |
static final int maxHp = 10; | |
int getSpeed(){ | |
return attkSpeed; | |
} | |
void increaseSpeed(spd: int){ | |
if (spd > 0){ | |
this.speed := this.speed + spd; | |
} | |
} | |
void print(){ | |
} | |
} | |
class zoombie{ | |
id: string; | |
attkSpeed: int; | |
damage: int; | |
hp: int; | |
static final int maxHp := 10; | |
int getShot(){ | |
return attkSpeed; | |
} | |
} | |
class sum{ | |
int cal(input: int){ | |
sum: int; | |
sum := 0; | |
for i:= 1 to input do | |
sum := sum + i; | |
return sum; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment