Conceptually, at line 22 you want to do something like:
1 2 3 4 5
int oldX = x;
x = (x+1) % fields.size(); // move down, wrap to beginning if necessary
// tell fields[oldX] not to blink
// tell fields[x] to blink
update();
Works, almost like a charm. There's one problem where it kind of bugs when moving down/up, where it can skip one of the fields, and not move at all, but that should be an easy fix of, I think it lies somewhere in the line: (x+1)%fields.size(); if I'm not mistaken?
No, my guess is that it's this line: if (keyboard.isKeyDown(ALLEGRO_KEY_DOWN)) {
What's to prevent this code from running twice (or 3 times or 3,000 times) when they press the key?
Using an if statement like that to check whether a key is currently down is good for movement and other things that should happen repeatedly for as long as the button is held down, but if you want something to happen once, no matter how long the key is pressed, you better use events.