Well done! Anyone can see the potential here. Possible bug: if you select a unit (that hasn't attacked yet) during the enemy's attacking phase you can attack after death when it's your turn again.