/Users/andrea/_magisterarbeit/korpus/clean/trainkorpus/32/file14.html NN ----------------------------------------- : code VV complete JJ here's NNS the DT final JJ Tamagotchi NP class NN code NN class NN Tamagotchi NP private JJ var NN currentCalories NNS . SENT Number NN . SENT private JJ var NN name NN . SENT String NN . SENT private JJ var NN isAlive NN . SENT Boolean NP . SENT private JJ var NN digestIntervalID NN . SENT Number NN . SENT private JJ var NN clip NN . SENT MovieClip NN . SENT private JJ static JJ var NN MAX NP NAME NN LENGTH NN . SENT Number NN 20 CD . SENT private JJ static JJ var NN DEFAULT NN NAME NN . SENT String NN Unnamed JJ Pet NP . SENT private JJ static JJ var NN MAX NP CALORIES NNS . SENT Number NN 2000 CD . SENT private JJ static JJ var NN CALORIES NNS PER IN SECOND JJ . SENT Number NN 100 CD . SENT private JJ static JJ var NN SYMBOL NN ID NN . SENT String NP TamagotchiSymbol NP . SENT public JJ function NN Tamagotchi NP petName NN . SENT String NN , , target NN . SENT MovieClip NP , , depth NN . SENT Number NN , , x LS . SENT Number NN , , y NP . SENT Number NN clip NN target NN . SENT attachMovie NP Tamagotchi NP . SENT SYMBOL NN ID NN , , tamagotchi NN depth NN , , depth NN . SENT clip NN . SENT x SYM x NN . SENT clip NN . SENT y NP y NP . SENT setName JJ petName NN . SENT currentCalories NNS Tamagotchi NP . SENT MAX NP CALORIES NNS . SENT isAlive JJ true JJ . SENT digestIntervalID JJ setInterval NN this DT , , digest VV , , 1000 CD . SENT Key JJ . SENT addListener JJR this NN . SENT public JJ function NN feed NN foodItem NN . SENT Food NN . SENT Void NN if IN isAlive JJ false JJ trace NN getName NN is VBZ dead JJ . SENT You PP can't VVD feed VV it PP . SENT . SENT return NN . SENT trace VV getName NN ate VVD the DT foodItem NN . SENT getName JJ foodItem NN . SENT getCalories NNS calories NNS . SENT . SENT if IN foodItem NN . SENT getCalories NNS currentCalories NNS Tamagotchi NP . SENT MAX NP CALORIES NNS currentCalories NNS Tamagotchi NP . SENT MAX NP CALORIES NNS . SENT else JJ currentCalories NNS foodItem NN . SENT getCalories NNS . SENT public JJ function NN setName NN newName NN . SENT String NN . SENT Void NN if IN newName NN . SENT length NN Tamagotchi NP . SENT MAX NP NAME NN LENGTH NN trace VV Warning NP . SENT specified JJ name NN is VBZ too RB long JJ . SENT . SENT newName NN newName NN . SENT substr NN 0 CD , , Tamagotchi NP . SENT MAX NP NAME NN LENGTH NN . SENT else RB if IN newName NN trace VV Warning NP . SENT specified JJ name NN is VBZ too RB short JJ . SENT . SENT return NN . SENT name NN newName NN . SENT clip NN . SENT name NN txt NN . SENT text NN name NN . SENT public JJ function NN getName NN . SENT String NN if IN name NN null NN return NN Tamagotchi NP . SENT DEFAULT NN NAME NN . SENT else JJ return NN name NN . SENT private JJ function NN die NN deathType NN . SENT Number NN . SENT Void JJ clearInterval JJ digestIntervalID NN . SENT isAlive JJ false JJ . SENT Key JJ . SENT addListener JJR this NN . SENT trace VV getName NN has VHZ died VVN . SENT . SENT clip NN . SENT gotoAndStop NN dead NN . SENT private JJ function NN displayHealthStatus NN . SENT Void JJ var NN caloriePercentage NN . SENT Number NN Math NP . SENT floor NN currentCalories NNS Tamagotchi NP . SENT MAX NP CALORIES NNS 100 CD . SENT trace VV getName NN has VHZ currentCalories NNS calories NNS caloriePercentage NN of IN its PP$ food NN remaining VVG . SENT . SENT if IN caloriePercentage NN 20 CD clip NN . SENT hungerIcon NN . SENT gotoAndStop NN starving VVG . SENT else RB if IN caloriePercentage NN 50 CD clip NN . SENT hungerIcon NN . SENT gotoAndStop NN hungry JJ . SENT else JJ clip NN . SENT hungerIcon NN . SENT gotoAndStop NN full JJ . SENT private JJ function NN digest VV . SENT Void VV trace VV The DT Tamagotchi NP is VBZ digesting VVG . SENT . SENT . SENT . SENT currentCalories NNS Tamagotchi NP . SENT CALORIES NNS PER IN SECOND JJ . SENT if IN currentCalories NNS 0 CD die NN . SENT else JJ displayHealthStatus NN . SENT private JJ function NN onKeyDown NN . SENT Void NN if IN Key NP . SENT getCode NN 65 CD feed NN new JJ Apple NP . SENT else RB if IN Key NP . SENT getCode NN 83 CD feed NN new JJ Sushi NN . SENT