Press the right and left arrow keys to move. Now choose the doors wisely...! ::EDIT:: You will have to press the flag twice for the game to work properly.
Credit to SymmetryYES1.