dT timestep for selecting moves or in a shop

Check for keyboard input.
If the key is left, right, up, or down, update the currently selected menu item accordingly.
If the key is space or enter, perform the action based on the selected item.

dT timestep for move animation

Update animation one timesteps worth.
Any keyboard input is ignored

Someone's HP reach 0

Check to see who has 0 or less HP
If the player has 0, game over
If the creature has less, player wins, go to shop mode

Player selects a move

Player selects a move to perform from the menu
Check to see if player has enough AP/MP to perform move
If they do, start animation
At the end of animation, calculate damage
Check to see if Opponent has 0 Hp
Enemy's move

Enemy's Move

Using AI, select move for enemy to do
Start animation
At the end of the animation, calculate damage
Check to see if player has 0 HP
If not, player's move

Between Battle (Shop Mode)

Player gains back half of total HP, MP, and AP.
Player gains experience and gold from defeated monster.
Check total experience for level increase.
If level increases, player's attributes increase and they choose a new attack move. The new attack move is added to the player's attack manual.
Purchaseable weapons, armor, and magic spells are displayed with gold costs.
If player purchases new items, those replace their present items.
If player purchases a new spell, it is added to his spellbook.
Player is given the option to purchase healing to further increase his current HP, MP and AP.