update method
void
update()
Updates the position and content of the column.
Moves the column down by speed. If it goes off-screen, it resets to the top. Also randomly changes some characters to create the "glitch" effect.
Implementation
void update() {
y += speed;
if (y > screenHeight) {
y = -length * 15.0;
_generateCharacters();
}
if (_random.nextDouble() > 0.9) {
int index = _random.nextInt(length);
characters[index] = chars[_random.nextInt(chars.length)];
}
}