17 lines
643 B
Plaintext
17 lines
643 B
Plaintext
package dk.itu.mario.level;
|
|
|
|
rule "NoviceJumper"
|
|
when
|
|
playerProfile : PlayerProfile( jumpSkill <= 20 ) // condition
|
|
then
|
|
System.out.println("PlayerProfile indicates NoviceJumper. Disabling Pipe challenge."); // consequence
|
|
playerProfile.setDisabled(LevelComponent.TYPE.PIPE_JUMP);
|
|
end
|
|
|
|
rule "BeginnerJumper"
|
|
when
|
|
playerProfile : PlayerProfile( jumpSkill > 20 ) // condition
|
|
then
|
|
System.out.println("PlayerProfile indicates Beginner (or better) Jumper. Pipe challenge enabled!"); // consequence
|
|
playerProfile.setEnabled(LevelComponent.TYPE.PIPE_JUMP);
|
|
end |