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

Reset and randomize #51

Closed pirog closed 8 years ago

pirog commented 9 years ago

For fun, every now and then we will want to reset the game.

Create a giant red button that will reset all the games to "ongoing", remove any winners or losers and add in random vote totals below the "total to win" for both president and robot.

The giant red button should be very giant and very red. it should be as secure as possible and it should definitely ask you twice before doing this.

BONUS POINTS if you do a batch_api() implementation.

oneorangecat commented 8 years ago

Okay, I've added an admin config page through playbox_admin called "Battle Management". I threw in a few bits from the partial playbox_dashboard module for fun. My front end fu is variable so the button placement/alignment is a bit suspect! I'm also aware that focus is staying on the button when you hit cancel to the prompt. This could be improved for sure (proper Drupal confirmation process would be good etc) but the button is pretty big and definitely red, and hopefully does what it should!