You can actually click the sword to attack instantly and click the shield to defend. I was initially trying to implement an turn based attack feature, but I ran out of time with that. So, you can wait until the enemy attacks or do it yourself by clicking the buttons on the player card.
Thanks for playing!