Так, ну теперь точно все должно работать
package com.javarush.games.moonlander;
import com.javarush.engine.cell.*;
public class GameObject {
public double x;
public double y;
public int[][] matrix;
public int width;
public int height;
public GameObject(double x, double y, int[][] matrix) {
this.x = x;
this.y = y;
this.matrix = matrix;
width = matrix[0].length;
height = matrix.length;
}
public void draw(Game game) {
if (matrix != null) {
for(int i = 0; i < width; i++)
for(int j = 0; j < height; j++)
game.setCellColor((int)x+i, (int)y+j, Color.values()[matrix[j][i]]);
}
}
}