void setPoint(double x, double y, char c) {
if (x < 0 || y < 0 || y >= matrix.length || x < matrix[0].length) {
int x2 = (int) Math.round(x);
int y2 = (int) Math.round(y);
matrix[y2][x2] = c;
}
}
void drawMatrix(double x, double y, int[][] matrix, char c) {
for (int i = 0; i < matrix.length; i++) {
for (int j = 0; j < matrix[i].length; j++) {
if (matrix[i][j] != 0) {
setPoint(x + j, y + j, c);
}
}
}
}
package com.javarush.task.task24.task2413;
public class Ball extends BaseObject {
public Ball(double x, double y, double radius) {
super(x, y, radius);
}
@Override
public void draw(Canvas canvas) {
}
@Override
public void move() {
}
}