Sets background color at coordinates.
void setBackground(int x, int y, int bg) { if (isCellValid(x, y)) { attributes[(y * width + x) * 3 + 1] = bg; } }