megazear7 / battleleague

0 stars 0 forks source link

Add Battle Resolve #10

Open megazear7 opened 10 years ago

megazear7 commented 10 years ago

We need a feature that pauses the normal movement if there are apposing armies in the same space. If two apposing armies are in the same square, then any user that is apart of the battle should should have a button on that square that says "Resolve Battle". Correspondingly the army tables should not says move, but should instead say "Battle needs resolved". Users that are not apart of the battle should simply see a battle icon on that space. They however do not have the ability to resolve the battle. When a user that is involved in the battle clicks resolve, they should be taken to a new page designed for resolving the battle. Each army involved is listed with the option to set them as a winner or loser, defaulting to loser. When submitted this form sets a new boolean flag for the armies (is_winner and is_loser) and then redirects to the game show page. On the game show page if an army has an is_winner or is_loser flag set then they have the option to move, with a special 'battle resolve' move icon, which is different if you the winner or loser. If there exists any army that has there is_winner or is_loser flag set then the current_army does not get the option to move. In this way all involved armies must move before the standard game movements can continue. These battle resolve movements should not effect the game turn sequence.

megazear7 commented 10 years ago
add_column :armies, :is_winner, :boolean
add_column :armies, :is_winner, :boolean