Skip to content

Commit

Permalink
Merge pull request #17 from StackThis/paul
Browse files Browse the repository at this point in the history
Choose your game size.
  • Loading branch information
warmbowski committed Apr 17, 2015
2 parents fba7e0f + 902891c commit 7594f26
Show file tree
Hide file tree
Showing 10 changed files with 214 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@1.0.5
METEOR@1.1.0.2
28 changes: 14 additions & 14 deletions .meteor/versions
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
aldeed:template-extension@3.4.3
autoupdate@1.2.0
babrahams:editable-json@0.3.12
autoupdate@1.2.1
babrahams:editable-json@0.4.3
base64@1.0.3
binary-heap@1.0.3
blaze@2.1.0
blaze@2.1.2
blaze-tools@1.0.3
boilerplate-generator@1.0.3
callback-hook@1.0.3
Expand All @@ -13,7 +13,7 @@ ddp@1.1.0
deps@1.0.7
ejson@1.0.6
fastclick@1.0.3
fortawesome:fontawesome@4.2.0_2
fortawesome:fontawesome@4.3.0
geojson-utils@1.0.3
gwendall:session-json@0.1.7
html-tools@1.0.4
Expand All @@ -26,16 +26,16 @@ lai:collection-extensions@0.1.3
launch-screen@1.0.2
livedata@1.0.13
logging@1.0.7
meteor@1.1.5
meteor@1.1.6
meteor-platform@1.2.2
meteortoys:toykit@0.2.1
minifiers@1.1.4
minimongo@1.0.7
meteortoys:toykit@0.3.4
minifiers@1.1.5
minimongo@1.0.8
mobile-status-bar@1.0.3
momentjs:moment@2.9.0
momentjs:moment@2.10.2
mongo@1.1.0
msavin:mongol@1.0.8
observe-sequence@1.0.5
msavin:mongol@1.0.22
observe-sequence@1.0.6
ordered-dict@1.0.3
random@1.0.3
reactive-dict@1.1.0
Expand All @@ -45,9 +45,9 @@ retry@1.0.3
routepolicy@1.0.5
session@1.1.0
spacebars@1.0.6
spacebars-compiler@1.0.5
templating@1.1.0
tracker@1.0.6
spacebars-compiler@1.0.6
templating@1.1.1
tracker@1.0.7
ui@1.0.6
underscore@1.0.3
url@1.0.4
Expand Down
8 changes: 4 additions & 4 deletions client/styles/alert-animations.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
.alert-blink {
color: #ffa500;
color: #ff4500;
/*Shade of orange: http://www.color-hex.com/color/ffa500*/
animation: color 1s infinite;
animation: color 2s infinite;
animation-direction: alternate;
animation-name: alert-blink;
-moz-animation: color 1s infinite;
-moz-animation: color 2s infinite;
-moz-animation-direction: alternate;
-moz-animation-name: alert-blink;
-webkit-animation: color 1s infinite;
-webkit-animation: color 2s infinite;
-webkit-animation-direction: alternate;
-webkit-animation-name: alert-blink;
}
Expand Down
58 changes: 55 additions & 3 deletions client/styles/fontawesome.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ li.icon-:before {
opacity: 0.5;
}

.icon-1:before {
.icon-0:before {
/*bomb*/
content: "\f1e2";
font-family: FontAwesome;
}

.icon-1:before {
/*camera-retro*/
content: "\f083";
font-family: FontAwesome;
}

.icon-2:before {
/*bug*/
content: "\f188";
Expand Down Expand Up @@ -55,8 +61,6 @@ li.icon-:before {

.icon-9:before {
/*clock*/
/* position: absolute;
top: -100%;*/
content: "\f017";
font-family: FontAwesome;
}
Expand Down Expand Up @@ -126,3 +130,51 @@ li.icon-:before {
content: "\f135";
font-family: FontAwesome;
}

.icon-21:before {
/*lightbulb-o*/
content: "\f0eb";
font-family: FontAwesome;
}

.icon-22:before {
/*motorcycle*/
content: "\f0eb";
font-family: FontAwesome;
}

.icon-23:before {
/*wrench*/
content: "\f0ad";
font-family: FontAwesome;
}

.icon-24:before {
/*spoon*/
content: "\f1b1";
font-family: FontAwesome;
}

.icon-25:before {
/*soccer-ball-o*/
content: "\f1e3";
font-family: FontAwesome;
}

.icon-26:before {
/*support*/
content: "\f1cd";
font-family: FontAwesome;
}

.icon-27:before {
/*umbrella*/
content: "\f0e9";
font-family: FontAwesome;
}

.icon-28:before {
/*trophy*/
content: "\f091";
font-family: FontAwesome;
}
42 changes: 36 additions & 6 deletions client/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,39 @@ h1 {
margin: 0.8rem 0;
}

input[type=button]{
#new-game-form {
display: flex;
}

#new-game-form .form-spacing-two {
}

input[type=submit]{
background-color: lightblue;
color: #5C5C5C;
font-size: 1rem;
border-radius: 5px;
text-align: center;
padding: .4rem .6rem;
border-top: none;
border-left: none;
border-right: .13rem #86c5da solid;
border-bottom: .13rem #86c5da solid;
transition: background-color 0.5s, color 0.5s, border-color 0.5s;
}

input[type=submit]:hover, input[type=submit]:focus{
background-color: #5b96a9;
color: #242424;
border-color: #44707f;
transition: background-color 0.5s, color 0.5s, border-color 0.5s;
}

input[type="radio"].game-size {
display: none;
}

input[type="radio"].game-size + label {
background-color: lightblue;
color: #5C5C5C;
font-size: 1rem;
Expand All @@ -33,7 +65,8 @@ input[type=button]{
transition: background-color 0.5s, color 0.5s, border-color 0.5s;
}

input[type=button]:hover, input[type=button]:focus{
input[type="radio"].game-size:checked + label {
position: relative;
background-color: #5b96a9;
color: #242424;
border-color: #44707f;
Expand Down Expand Up @@ -77,7 +110,6 @@ input[type=button]:hover, input[type=button]:focus{
transition: background-color 2s;
}


/**Card Grid/Match-container Template Styling*/
.grid-container > ul {
list-style-type: none;
Expand Down Expand Up @@ -268,7 +300,7 @@ header.head-container {
position: absolute;
box-sizing: content-box;
max-width: 700px;
height: 220px;
height: 230px;
top: 30%;
right: 0;
bottom: 0;
Expand All @@ -291,5 +323,3 @@ header.head-container {
left: 0;
color: #EFEFEF;
}


17 changes: 14 additions & 3 deletions client/templates/gameControl/gameContol.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template name='GameControl'>
{{#if gameInProgress}}
<input type=button id='leaveGame' value='Leave Game'>
<input type='submit' id='leaveGame' value='Leave Game'>
<input type='submit' id='restartGame' value='Restart Game'>
<section class="game-ui-flex">
{{> Grid}}
{{> Matches}}
Expand All @@ -12,13 +13,23 @@
<p>The twists in this version are that each matching pair has a different score added to your total, and to beware of the “bomb” cards! They will subtract points when accidentally matched.</p>
<p>Enjoy!</p>
</section>
<input type=button id='newGame' value='Queue up a New Game'>
<form id='new-game-form'>
<div class='form-spacing-two'>
<input type='submit' id='newGame' value='Queue up a New Game'>
</div>
<div class='form-spacing-two'>
<input type='radio' id='toggle-little' class='game-size' name='gameSize' value='Little' checked>
<label for='toggle-little'><i class="fa fa-th-large"></i> Little (40)</label>
<input type='radio' id='toggle-big' class='game-size' name='gameSize' value='Big'>
<label for='toggle-big'><i class="fa fa-th"></i> Big (56)</label>
</div>
</form>
<h4 class='queue-message'>
... and wait for someone to challenge you. Or click on a queued game below to join someone else's game.
</h4>
{{#each gamesWaiting}}
<p id='{{_id}}' class='waiting-queue'>
<i class="fa fa-toggle-right"></i> Waiting for challenger (Game created at {{formatDate timestamp 'LT'}})
<i class="fa fa-toggle-right"></i> {{gridSize}} game waiting for challenger<br> (Game created at {{formatDate timestamp 'LT'}})
</p>
{{/each}}
{{#unless gamesWaiting}}
Expand Down
15 changes: 9 additions & 6 deletions client/templates/gameControl/gameContol.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,17 @@ Template.GameControl.events ({
function(err, res) {
Session.set('gameId', joinGameId);
localStorage.setItem('sm_gameId', joinGameId);

Session.set('message', 'Game on! Player 2 has the first move.');
}
);
},

'click #newGame': function(evt) {
Meteor.call('newGame', Session.get('deviceId'), function (err, res) {
'submit #new-game-form': function(evt) {
evt.preventDefault();
var gameSize = evt.target.gameSize.value;
Meteor.call('newGame', Session.get('deviceId'), gameSize, function(err, res) {
var newGameId = res;
Session.set('gameId', newGameId);
localStorage.setItem ('sm_gameId', Session.get('gameId'));

Session.set('message', 'Waiting for challenger to join.');
});
},

Expand All @@ -44,6 +42,11 @@ Template.GameControl.events ({
Session.set('gameId', '');
localStorage.setItem('sm_gameId', '');
}
},

'click #restartGame': function(evt) {
Meteor.call('newGame', Session.get('deviceId'), null, Session.get('gameId'), function(err, res) {
console.log(res);
});
}
});
Empty file added server/lib/classes.js
Empty file.
Loading

0 comments on commit 7594f26

Please sign in to comment.