public void draw(BoardColorsTable colors, Matrix m) {
for (int y = 0; y < m.cy; y++) {
for (int x = 0; x < m.cx; x++) {
String s = m.get(x, y);
RangeColor r = colors.getColor(s);
if (r == null) {
setColor(new MatrixPoint(x, y), Color.BLACK.getRGB());
} else {
setColor(new MatrixPoint(x, y), r.average());
}
}
}
}