80行目でコンパイラエラーが発生しています。
エラー:/Users.../AsciiDisplay.java:80:シンボルが見つかりません
シンボル:メソッドdraw(AsciiDisplay)
場所:クラスjava.lang.Object
public class AsciiDisplay {
private char [][] grid;
private ArrayList shapes;
public AsciiDisplay() {
grid = new char [30][15];
shapes = new ArrayList();
}
public void updateGrid() {
for(int i = 0; i < shapes.size(); i++) {
shapes.get(i).draw(this); //Line 80: The error is in this line of code.
}
}
}
public class Shape {
protected String id;
protected Coordinate location;
public Shape(String id, Coordinate location) {
this.id = id;
this.location = location;
}
public void draw(AsciiDisplay dis) {
dis.putCharAt(location.getX(),location.getY(),'?');
}
}