Post #18
230

-- Спасибо за особые поздравления Monika, Nils и Miner, но вы всё забываете, ктож я таков.
————————————————
————————————————
package TestClass;
import com.ts.src.hpbzdy.Defender
import com.ts.src.hpbzdy.PlatformModel
public DefensePlatform(int x, int y, int width, int height) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
public boolean checkCakeDeflected(int cakeX, int cakeY) {
boolean hitX = cakeX >= this.x && cakeX <= (this.x + this.width);
boolean hitY = cakeY >= this.y && cakeY <= (this.y + this.height);
if (hitX && hitY) {
System.out.println("LOGGER:(\"Система защиты: Торт успешно заблокирован платформой кода!\")");
return true;
}
return false;
}
public int getX() { return x; }
public int getY() { return y; }
public int getWidth() { return width; }
public int getHeight() { return height; }
}
- ❤ 1


