Arrow keys to move and space to attack. The enemy moves up and down and randomly attacks. If you want to make a game with a battle system like this, feel free to check out the code!
All by me