33 lines
1.2 KiB
Plaintext
33 lines
1.2 KiB
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
|
|
|
|
rule "NoviceRunner"
|
|
when
|
|
playerProfile : PlayerProfile( runSkill <= 20 ) // condition
|
|
then
|
|
System.out.println("PlayerProfile indicates NoviceRunner. Disabling Maze challenge."); // consequence
|
|
playerProfile.setDisabled(LevelComponent.TYPE.MAZE);
|
|
end
|
|
|
|
rule "BeginnerRunner"
|
|
when
|
|
playerProfile : PlayerProfile( runSkill > 20 ) // condition
|
|
then
|
|
System.out.println("PlayerProfile indicates Beginner (or better) Runner. Maze challenge enabled!"); // consequence
|
|
playerProfile.setEnabled(LevelComponent.TYPE.MAZE);
|
|
end |