Уже с десяток вариантов опробовала, разные обращения к полям и т.п., ответ один - не проходит, ставьте в true.
Непонятно.
package com.javarush.task.task24.task2413;
public class Ball extends BaseObject {
private double speed;
private double direction;
private double dx;
private double dy;
private boolean isFrozen;
public Ball(double x, double y, double speed, double direction) {
super(x, y, 1);
this.speed = speed;
this.direction = direction;
isFrozen = true;
}
public double getSpeed() {
return speed;
}
public double getDirection() {
return direction;
}
public double getDx() {
return dx;
}
public double getDy() {
return dy;
}
public Ball(double x, double y, double radius) {
super(x, y, radius);
}
@Override
public void draw(Canvas canvas) {
canvas.setPoint(x, y, 'O');
}
void start() {
isFrozen = false;
}
@Override
public void move() {
if(isFrozen == false) {
x += dx;
y += dy;
}
}
void setDirection(double direction){
this.direction = direction;
double angle = Math.toRadians(direction);
dx = Math.cos(angle) * speed;
dy = -Math.sin(angle) * speed;
}
void checkRebound(int minx, int maxx, int miny, int maxy) {
}
}
