AnotherDole / wrongest

The Wrongest Words
3 stars 0 forks source link

display scores in player list #2

Closed AhoyLemon closed 9 years ago

AhoyLemon commented 9 years ago

In the player list screen, display each player's current score

AhoyLemon commented 9 years ago

So, I'm having a hard time figuring out how to put the scores in the player list, so here's what I'm thinking.

  1. I'm gonna take a stab at redesigning how that player list works, indicating
    • each player's score
    • who is the dealer
    • who has already gone
    • who is active (if there's currently an active player) I'll do this with some dummy data, where necessary.
  2. Then, when I got that set up and committed, I'll toss the task over to you to stick in the score and (if possible) add a new "active" flag to the player who is defending.
AnotherDole commented 9 years ago

Sounds good.

AhoyLemon commented 9 years ago

Okay, I think I handled the thing with 4 classes and two internal spans.

My idea is that the first time around, none of the players have the has-score class, since it's their first time at bat and a series of 0s would be distracting. So the html looks like...

<li id="player2">
  <span class="player-name">bob</span>
</li>

Second time around, now we want you to see what the players' scores are, so player2's markup now looks like...

<li id="player2" class="has-score">
  <span class="player-name">bob</span>
  <span class="player-score">6</span>
</li>

has-score will put the notch in the corner, and the .player-score span will absolute position the score on top of the notch.

Let me know if something doesn't make sense.

AnotherDole commented 9 years ago

Looks correct on my screen. Doesn't yet work for players joining a paused game.

AhoyLemon commented 9 years ago

Looks good. Is adding .active to the <li> of the player who is currently defending an option?

AnotherDole commented 9 years ago

Oops, forgot about that part. It should be finished now.