kalamuna / playbox

A playground for ambitious would-be code artists.
http://live-playbox.at.kalamuna.com/
GNU General Public License v2.0
5 stars 29 forks source link

Battle counter doesn't register a winner #35

Closed pirog closed 9 years ago

pirog commented 9 years ago

On a battle you can keep on clicking on a president or robot to increment their vote. We might want to consider implementing some combination of the following improvements. You do not have to do all of these. Pick whichever you would like.

  1. When either a robot or president reaches the win total some sort of CSS class is injected via the ajax callback in playbox_battles_vote in the playbox_battles.module file. This CSS class should be a cool way to indicate the winner ... AND loser.
  2. Piggy-backing off 1. When a winner and loser is declared the battle node needs to be updated so the Loser field contains the nid of the loser and the Winner field contains the nid of the winner. The battle should also be marked as complete using the Battle Completed field. This should also happen in playbox_battles_vote in the playbox_battles.module file.
  3. Allow the current user to only vote once on each battle.