Skip to content

Commit

Permalink
Fix merge/rebase to master
Browse files Browse the repository at this point in the history
  • Loading branch information
bmwwoo committed Nov 17, 2015
2 parents 57880c9 + 4f732d1 commit 1990098
Show file tree
Hide file tree
Showing 8 changed files with 104 additions and 22 deletions.
4 changes: 3 additions & 1 deletion app/controllers/MathSwipeController.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ InputSolver = require '../services/InputSolver'
RandomizedFitLength = require '../services/RandomizedFitLength'
ResetButton = require '../services/ResetButton'
RunningSum = require '../services/RunningSum'
ShareGameService = require '../services/ShareGameService'
SolutionService = require '../services/SolutionService'
Title = require '../services/Title'
TrackingService = require '../services/TrackingService'
Expand All @@ -33,12 +34,13 @@ class MathSwipeController
else
TrackingService.desktopView()
@cursorToPointer()
ShareGameService.setMessage()
@initialize()

# # Uncomment the following line to perform general tests
# GeneralTests.tests @board

initialize: () ->
initialize: ->
length = 3
solutionPlacements = []
inputLengths = []
Expand Down
8 changes: 8 additions & 0 deletions app/services/ShareGameService.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
TwitterGameService = require './TwitterGameService'

class ShareGameService

@setMessage: ->
TwitterGameService.setTweet()

module.exports = ShareGameService
12 changes: 12 additions & 0 deletions app/services/TwitterGameService.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
$ = require 'jquery'

class TwitterGameService

@setTweet: ->
possible = ['Play MathSwipe with me! Try to beat my score at',
'Play MathSwipe with me! Try to solve my board at',
'Play MathSwipe with me! Solve my puzzle at']
text = possible[Math.floor(Math.random() * 3)]
$( '#tweet' ).attr( 'data-text' , text )

module.exports = TwitterGameService
90 changes: 73 additions & 17 deletions bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<head>
<link rel="StyleSheet" type="text/css" href="./public/assets/stylesheets/GameBackground.css">
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">
<link rel="shortcut icon" href="/public/assets/images/favicon.ico" type="image/x-icon">
<link rel="icon" href="/public/assets/images/favicon.ico" type="image/x-icon">
<script> // GOOGLE ANALYTICS CODE
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
Expand Down Expand Up @@ -28,6 +30,8 @@
<div id="game-button-wrapper" class="game-button-wrapper">
<div id="reset-button" type="submit" class="game-btn"><p class="button-text">Reset</p></div>
<div id="new-game-button" type="submit" class="game-btn"><p class="button-text">New Game</p></div>
<a id="tweet" href="https://twitter.com/share" class="twitter-share-button" data-text="Play MathSwipe with me! Connect numbered tiles to match the answers." data-size="large" data-hashtags="mathswipe">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
</div>
</div>
<div class="center-column">
Expand Down
Binary file added public/assets/images/favicon.ico
Binary file not shown.
4 changes: 2 additions & 2 deletions public/assets/stylesheets/GameBackground.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions public/assets/stylesheets/GameBackground.sass
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ body
font-size: 30px

.game-desc-hr
margin: 40px 0px 20px 0px
margin: 10px 0px 20px 0px

#how-to-play
margin: 10px auto 10px auto
Expand Down Expand Up @@ -77,7 +77,7 @@ body
word-wrap: break-word
display: inline-block
width: 40%
margin: 0px 10px
margin: 0 0 10px
background-color: Transparent
border-style: solid
border-color: #a7acb0
Expand Down

0 comments on commit 1990098

Please sign in to comment.