Skip to content
Snippets Groups Projects
Commit 4f54f10f authored by Mail Ladjali's avatar Mail Ladjali
Browse files

tpQu02::exo-WarriorCard

parent 584e2a74
No related branches found
No related tags found
No related merge requests found
package tpQu.tp02;
class WarriorCard{
private String name;
private int strength;
private int agility;
public WarriorCard(String name, int strength, int agility){
this.name = name;
this.strength = strength;
this.agility = agility;
}
public boolean equals(Object obj){
}
public int compareStrength(WarriorCard other){
if(WarriorCard.agility==WarriorCard other.agility){
return 0;
} else if(WarriorCard.agility<WarriorCard other.agility){
return 1;
} else if(WarriorCard.agility>WarriorCard other.agility){
return -1;
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment