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 (isCellValid(x, y)) {
    characters[y * width + x] = char;
  }
}