setCharacter method

void setCharacter(
  1. int x,
  2. int y,
  3. String char
)

Sets character at coordinates.

Implementation

void setCharacter(int x, int y, String char) {
  if (x >= 0 && x < width && y >= 0 && y < height) {
    characters[y * width + x] = char;
  }
}