admanb / handtracker

A full rails web application that tracks decks of cards.
handtracker.heroku.com
7 stars 3 forks source link

Added public hand-size counts #23

Closed seanmcd closed 11 years ago

seanmcd commented 12 years ago

I added a section to the game-view page that shows how many cards each player has in their hand. I can't think of any games offhand where that's not public information.

admanb commented 12 years ago

The change to tab spacing is going to make it inconsistent with the rest of the project and makes it hard to see what actually got added. Is there any reason you can't change your editor configuration to keep the indentation untouched?

seanmcd commented 12 years ago

Revised as requested. Sorry about that - I didn't think too hard about yanking the tab style into one that got things to look clean on my setup (no prizes for guessing what kind of environment I'm using :p ). Comparing your branch and mine should now yield:

[23:06:07][seanm@stronglydev:~/handtracker]$ git diff ./app/views/games/show.html.erb
diff --git a/app/views/games/show.html.erb b/app/views/games/show.html.erb
index 7b164aa..4ecfd96 100644
--- a/app/views/games/show.html.erb
+++ b/app/views/games/show.html.erb
@@ -158,4 +158,17 @@
                 <h2>Acts</h2>
         </div>
 </div>
+<div class="object_box object_top_border">
+    <div class="view">
+           <ul>
+               <% @game.players.each do |p| %>
+                 <li>Player "<%= p.login %>" has <%= p.get_hand(@game).length %> cards in their hand.</li>
+               <% end %>
+           </ul>
+    </div>
+    <div class="guide">
+        <div class="guide_border"></div>
+        <h2>Hand Counts</h2>
+    </div>
+</div>
 <div class="object_box"></div>