Gets the character at (x, y). Returns a space if coordinates are out of bounds.
x
y
String getCharacter(int x, int y) { if (!isCellValid(x, y)) return ' '; return characters[y * width + x]; }