Skip to content

Commit

Permalink
Added info about player color
Browse files Browse the repository at this point in the history
  • Loading branch information
bestic committed Nov 3, 2013
1 parent 7e80645 commit 01cbcd4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion public/javascripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ define(['canvas', 'jquery', 'knob'], function(canvas, $, knob) {
});

socket.on('game_start', function(data) {
$('.oponent').html(data + " joined you in game");
$('.oponent').html(data.name + "has joined to your game");
if (!data.player) {
$('.yourcolor').html("Your color: Black");
$('.yourcolor').css("color", "black");
} else {
$('.yourcolor').html("Your color: Red");
$('.yourcolor').css("color", "red");
}
console.log('Game started');
$('.score').show();
$('.indicator').show();
Expand Down
2 changes: 1 addition & 1 deletion public/stylesheets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ body {
}

.score {
font-size: 24px;
font-size: 54px;
}

.logo {
Expand Down
1 change: 1 addition & 0 deletions views/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ block content
button#set-name Set name
div.game-status#game_status
div.oponent
div.yourcolor
div.score
span.own
span :
Expand Down

0 comments on commit 01cbcd4

Please sign in to comment.