I'm getting a compiler error at line 80:
Error: /Users.../AsciiDisplay.java:80: cannot find symbol
Symbol: method draw(AsciiDisplay)
Location: class 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(),'?');
}
}