problem with work

Recommended Videos

GeeksUtopia

New member
Feb 26, 2011
259
0
0
public void performMove(Dog otherDog, float randomNumber) {

if(!(this.isDefending)&&!(otherDog.isDefending)){
if(randomNumber * 100 <= speed){
otherDog.getHit(power);
}
else{
resultOfLastInteraction = "...." + this.name + "miss";
}

}
else if(!(this.isDefending) && (otherDog.isDefending)){

if((randomNumber * 100 >= 0) && (randomNumber * 100 <= 50)){
otherDog.getHit(250/power);
}
else if((randomNumber * 100 >= 51) && (randomNumber * 100 <= 75)){
Dog.getHit(250/power);
}
else if((randomNumber * 100 >= 76) && (randomNumber * 100 <= 100)){
tolerance.getHit(250/power);

}
else if((this.isDefending) && (otherDog.isDefending)){

}
}

Having a problem with this code. The problem is the Dog.getHit and tolerance.getHit. No matter what I change it to it is either "can't use in a primitive boolean or can't use static type
 

Redlin5_v1legacy

Better Red than Dead
Aug 5, 2009
48,834
0
0
Might want to hit the advice forum and have a more detailed title there. To be honest I thought this was going to be about co-workers or something.