Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
043b1ae
add analytics
gabrielecirulli Mar 9, 2014
b5b8a8a
Merge branch 'master' into gh-pages
gabrielecirulli Mar 9, 2014
54da66d
add twitter sharing button
gabrielecirulli Mar 9, 2014
c84ebb0
merge master & readd ga
gabrielecirulli Mar 10, 2014
06fa37b
add twitter sharing to game over screen
gabrielecirulli Mar 10, 2014
a85abfd
merge master
gabrielecirulli Mar 10, 2014
aaebb03
Merge branch 'master' into gh-pages
gabrielecirulli Mar 10, 2014
9d48120
Merge branch 'master' into gh-pages
gabrielecirulli Mar 10, 2014
2125c04
Merge branch 'master' into gh-pages
gabrielecirulli Mar 10, 2014
8bd4133
Merge branch 'master' into gh-pages
gabrielecirulli Mar 10, 2014
7f99ed8
Merge branch 'master' into gh-pages
gabrielecirulli Mar 10, 2014
62a314a
remove repeated ga call
gabrielecirulli Mar 10, 2014
b71af08
add hashtags on 2048
gabrielecirulli Mar 10, 2014
1ddcdae
fix hashtag
gabrielecirulli Mar 10, 2014
8ac3e1d
Merge branch 'master' into gh-pages
gabrielecirulli Mar 10, 2014
557b35f
Merge branch 'master' into gh-pages
gabrielecirulli Mar 10, 2014
68f7e4a
merge iphone version
gabrielecirulli Mar 10, 2014
789440d
Merge branch 'master' into gh-pages
gabrielecirulli Mar 11, 2014
6aa953c
add btc donate button
gabrielecirulli Mar 11, 2014
80c8787
remove coin widget
gabrielecirulli Mar 11, 2014
13b1606
Merge branch 'master' into gh-pages
gabrielecirulli Mar 11, 2014
50a4f29
add open graph meta tags
gabrielecirulli Mar 11, 2014
1cfb14c
merge conflict
gabrielecirulli Mar 11, 2014
9ce7f4e
async load for btc widget
gabrielecirulli Mar 11, 2014
4abe387
Merge branch 'master' into gh-pages
gabrielecirulli Mar 11, 2014
16a6ecf
put analytics first
gabrielecirulli Mar 11, 2014
347e11f
merge conflict
gabrielecirulli Mar 11, 2014
a95df7a
comment out coinwidget
gabrielecirulli Mar 11, 2014
bfd21d6
add basic btc button
gabrielecirulli Mar 11, 2014
f162d2a
remove coinwidget
gabrielecirulli Mar 11, 2014
39f229a
merge mixin button
gabrielecirulli Mar 11, 2014
9d50e7d
add bitcoin donate button
gabrielecirulli Mar 11, 2014
603833b
improve donate button animation
gabrielecirulli Mar 11, 2014
ff72bf8
custom bitcoin icon
gabrielecirulli Mar 11, 2014
ce45d4c
improve bitcoin popup for mobile
gabrielecirulli Mar 11, 2014
e861898
svg bitcoin icon
gabrielecirulli Mar 11, 2014
e1dde57
Merge branch 'master' into gh-pages
gabrielecirulli Mar 11, 2014
ebf96bf
Merge branch 'master' into gh-pages
gabrielecirulli Mar 11, 2014
96ad918
Adding a cache manifest
elicwhite Mar 12, 2014
03ec53e
fix conflict
gabrielecirulli Mar 12, 2014
d16f575
Merge branch 'master' into gh-pages
gabrielecirulli Mar 12, 2014
119d8ec
restore ga in gh-pages
gabrielecirulli Mar 12, 2014
52979f1
Merge branch 'master' into gh-pages
gabrielecirulli Mar 12, 2014
602c101
Merge branch 'master' into gh-pages
gabrielecirulli Mar 12, 2014
9f1c974
Merge branch 'master' into gh-pages
gabrielecirulli Mar 12, 2014
66b623d
add paypal donate button
gabrielecirulli Mar 12, 2014
53dd0a7
fix paypal image name
gabrielecirulli Mar 12, 2014
d7932b9
update button id
gabrielecirulli Mar 12, 2014
1fa9111
remove space between buttons
gabrielecirulli Mar 12, 2014
8b1f3a4
Merge branch 'master' into gh-pages
gabrielecirulli Mar 12, 2014
84fb032
Merge branch 'master' into gh-pages
gabrielecirulli Mar 13, 2014
91f0d16
merge transforms
gabrielecirulli Mar 13, 2014
702dd1a
Merge branch 'master' into gh-pages
gabrielecirulli Mar 13, 2014
b7f09a4
Merge branch 'master' into gh-pages
gabrielecirulli Mar 14, 2014
c6d4e4f
merge super tiles
gabrielecirulli Mar 14, 2014
887c6b4
shorten links while tweeting, ref #34
imcotton Mar 14, 2014
90f9541
Merge pull request #56 from imcotton/tweet-links
gabrielecirulli Mar 14, 2014
001a5b9
merge threshold change
gabrielecirulli Mar 14, 2014
907aff4
remove git.io uri
gabrielecirulli Mar 14, 2014
af61d05
remove twitter uri
gabrielecirulli Mar 14, 2014
f57c8b0
shorten links while tweeting, plus to ensure original counts
imcotton Mar 14, 2014
941e6ee
Merge pull request #58 from imcotton/tweet-links
gabrielecirulli Mar 14, 2014
36222ca
Merge branch 'master' into gh-pages
gabrielecirulli Mar 19, 2014
856e168
Merge pull request #82 from TheSavior/appcache
gabrielecirulli Mar 20, 2014
fb2e012
Merge branch 'master' into gh-pages
gabrielecirulli Mar 20, 2014
864a6c9
Merge branch 'master' into gh-pages
gabrielecirulli Mar 20, 2014
82e5598
improve appcache
gabrielecirulli Mar 20, 2014
6c8d94c
set black translucent bar on the web app
gabrielecirulli Mar 21, 2014
5afb368
merge new game button
gabrielecirulli Mar 22, 2014
f3c41d7
Merge branch 'master' into gh-pages
gabrielecirulli Mar 22, 2014
a0ca822
Merge branch 'master' into gh-pages
gabrielecirulli Mar 22, 2014
fe04a69
update appcache
gabrielecirulli Mar 22, 2014
fa49d3b
Merge branch 'master' into gh-pages
gabrielecirulli Mar 22, 2014
60ae359
Merge branch 'master' into gh-pages
gabrielecirulli Mar 22, 2014
2cc4f2a
update appcache
gabrielecirulli Mar 22, 2014
fc414e4
Merge branch 'master' into gh-pages
gabrielecirulli Mar 22, 2014
77a09fd
update cache.appcache date
gabrielecirulli Mar 22, 2014
73a3db0
Merge branch 'master' into gh-pages
gabrielecirulli Mar 22, 2014
b81c5e9
update cache.appcache date
gabrielecirulli Mar 22, 2014
5edc10a
merge android 2.3 support
gabrielecirulli Mar 23, 2014
0f66c18
update appcache with new files
gabrielecirulli Mar 23, 2014
888f0ad
Merge branch 'master' into gh-pages
gabrielecirulli Mar 23, 2014
9efe9da
update cache.appcache date
gabrielecirulli Mar 23, 2014
5110b25
Merge branch 'master' into gh-pages
gabrielecirulli Mar 23, 2014
26e2e0d
update cache.appcache date
gabrielecirulli Mar 23, 2014
1ca07d7
add email form to game over screen
gabrielecirulli Mar 24, 2014
7a6c761
set status bar to black
gabrielecirulli Mar 26, 2014
b56159b
disable phone detection0
gabrielecirulli Mar 27, 2014
733660f
Create gh-pages branch via GitHub
2048-class Apr 1, 2014
a12c4d9
Revert "Create gh-pages branch via GitHub"
Apr 1, 2014
a555827
Merge branch 'master' into gh-pages
Apr 1, 2014
f1c8a75
make more udacious
2048-class Apr 3, 2014
eb07fa0
add udacity favicon
2048-class Apr 3, 2014
81af489
Fix end game message
2048-class Apr 4, 2014
af60953
improve instructions
2048-class Apr 4, 2014
1264fd5
add C key to clear storage
2048-class Apr 4, 2014
2b14354
change default tweet text
2048-class Apr 4, 2014
bb64b27
fix default tweet text
2048-class Apr 4, 2014
392ba3a
change udacity tiles to pictures
2048-class Apr 8, 2014
0a9c861
add border styling on tiles
2048-class Apr 8, 2014
2f41900
small fix
2048-class Apr 8, 2014
2cbb589
Revert "change udacity tiles to pictures"
2048-class Apr 8, 2014
6d658cc
Revert "change udacity tiles to pictures"
2048-class Apr 8, 2014
4f96e0f
Revert "fix default tweet text"
2048-class Apr 8, 2014
5184e53
fix css
2048-class Apr 9, 2014
2753b77
change tiles to images
2048-class Apr 9, 2014
2920306
change meta tags
2048-class Apr 10, 2014
f0711a3
edit README
2048-class Apr 10, 2014
a5b3cbc
clean up styles and copy change
2048-class Apr 10, 2014
82901d2
Fix broken 'take the class' link
nicolasartman Apr 12, 2014
2712ccf
Merge pull request #3 from nicolasartman/patch-1
2048-class Apr 21, 2014
8534ff9
fafa
Oth1 Mar 12, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 6 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,13 @@
# 2048
A small clone of [1024](https://play.google.com/store/apps/details?id=com.veewo.a1024), based on [Saming's 2048](http://saming.fr/p/2048/) (also a clone).
# Make 2048
A Udacity version of Gabriele Cirulli's [original 2048](http://gabrielecirulli.github.io/2048/).

Made just for fun. [Play it here!](http://gabrielecirulli.github.io/2048/)
The original version is a small clone of [1024](https://play.google.com/store/apps/details?id=com.veewo.a1024), based on [Saming's 2048](http://saming.fr/p/2048/) (also a clone).

### Contributions

- [TimPetricola](https://github.com/TimPetricola) added best score storage
- [chrisprice](https://github.com/chrisprice) added custom code for swipe handling on mobile
- [elektryk](https://github.com/elektryk) made swipes work on Windows Phone
- [mgarciaisaia](https://github.com/mgarciaisaia) addes support for Android 2.3

Many thanks to [rayhaanj](https://github.com/rayhaanj), [Mechazawa](https://github.com/Mechazawa), [grant](https://github.com/grant), [remram44](https://github.com/remram44) and [ghoullier](https://github.com/ghoullier) for the many other good contributions.

### Screenshot

<p align="center">
<img src="http://pictures.gabrielecirulli.com/2048-20140309-234100.png" alt="Screenshot"/>
</p>

That screenshot is fake, by the way. I never reached 2048 :smile:

## Contributing
Changes and improvements are more than welcome! Feel free to fork and open a pull request. Please make your changes in a specific branch and request to pull into `master`! If you can, please make sure the game fully works before sending the PR, as that will help speed up the process.

You can find the same information in the [contributing guide.](https://github.com/gabrielecirulli/2048/blob/master/CONTRIBUTING.md)
### Notes for the Udacity verssion
We're using this version as the recommended fork to avoid potential learning issues as the original source changes (and the Udacity videos don't update). You can [fork the original repo as well](https://github.com/gabrielecirulli/2048)

## License
2048 is licensed under the [MIT license.](https://github.com/gabrielecirulli/2048/blob/master/LICENSE.txt)

## Donations
I made this in my spare time, and it's hosted on GitHub (which means I don't have any hosting costs), but if you enjoyed the game and feel like buying me coffee, you can donate at my BTC address: `1Ec6onfsQmoP9kkL3zkpB6c5sA4PVcXU2i`. Thank you very much!
Gabriele made this in his spare time, and it's hosted on GitHub (which means I don't have any hosting costs), but if you enjoyed the game and feel like buying him coffee, you can donate at his BTC address: `1Ec6onfsQmoP9kkL3zkpB6c5sA4PVcXU2i`.
47 changes: 47 additions & 0 deletions cache.appcache
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
CACHE MANIFEST

# Adds the ability to play the game online.
# The following comment needs to be updated whenever a change is made.
# Run `rake appcache:update` to do so
# Updated: 2014-03-27T17:09:22+01:00

# Main page
index.html

# CSS
style/main.css

# Fonts
style/fonts/clear-sans.css
style/fonts/ClearSans-Bold-webfont.eot
style/fonts/ClearSans-Bold-webfont.svg
style/fonts/ClearSans-Bold-webfont.woff
style/fonts/ClearSans-Light-webfont.eot
style/fonts/ClearSans-Light-webfont.svg
style/fonts/ClearSans-Light-webfont.woff
style/fonts/ClearSans-Regular-webfont.eot
style/fonts/ClearSans-Regular-webfont.svg
style/fonts/ClearSans-Regular-webfont.woff

# Other resources
meta/apple-touch-icon.png
meta/icon_bitcoin.svg
meta/icon_pp.svg
meta/og_image.png

# JavaScript
js/animframe_polyfill.js
js/application.js
js/bind_polyfill.js
js/classlist_polyfill.js
js/game_manager.js
js/grid.js
js/html_actuator.js
js/keyboard_input_manager.js
js/local_storage_manager.js
js/tile.js

favicon.ico

NETWORK:
*
Binary file modified favicon.ico
Binary file not shown.
40 changes: 30 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,39 +1,56 @@
<!DOCTYPE html>
<html>
<html lang="en" manifest="cache.appcache">
<head>
<meta charset="utf-8">
<title>2048</title>
<title>Make and Play Udacity 2048</title>

<link href="style/main.css" rel="stylesheet" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro:400,600,700' rel='stylesheet' type='text/css'>
<link rel="shortcut icon" href="favicon.ico">
<link rel="apple-touch-icon" href="meta/apple-touch-icon.png">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="keywords" content="HTML,CSS,Javascript,Make your own 2048,Play 2048">
<meta name="apple-mobile-web-app-status-bar-style" content="black">

<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0, maximum-scale=1, user-scalable=no, minimal-ui">
<meta name="format-detection" content="telephone=no" />

<meta property="og:title" content="2048 game"/>
<meta property="og:site_name" content="2048 game"/>
<meta property="og:description" content="Play Udacity 2048. Then, make your own 2048 game in Udacity's 2 hour mini course for programming beginners!"/>
<meta property="og:image" content="http://gabrielecirulli.github.io/2048/meta/og_image.png"/>
</head>
<body>
<div class="container">
<div class="heading">
<h1 class="title">2048</h1>
<h1 class="title">Make 2048</h1>
<div class="scores-container">
<div class="score-container">0</div>
<div class="best-container">0</div>
</div>
</div>

<div class="above-game">
<p class="game-intro">Join the numbers and get to the <strong>2048 tile!</strong></p>
<p class="game-intro">
<a class="restart-button">New Game</a>
Use the arrow keys to slide tiles. Combine similar tiles to create new ones.</p>

</div>

<div class="pre-game">
<p class="learn">Learn to make your own version of 2048 in 30 minutes in Udacity's mini online class for beginners.</p><a class="learn" href="https://www.udacity.com/course/ud248">Take the Class!</a>
</div>


<div class="game-container">
<div class="game-message">
<p></p>
<div class="lower">
<a class="keep-playing-button">Keep going</a>
<a class="retry-button">Try again</a>
<a href="http://www.udacity.com/course/ud248"class="learn learn-low">Take the Class!</a>
<a class="retry-button">Play Again</a>
<div class="score-sharing"></div>
</div>
</div>

Expand Down Expand Up @@ -69,16 +86,17 @@ <h1 class="title">2048</h1>
</div>
</div>


<p class="game-explanation">
<strong class="important">How to play:</strong> Use your <strong>arrow keys</strong> to move the tiles. When two tiles with the same number touch, they <strong>merge into one!</strong>
<strong class="important">Make your own version:</strong> If you'd like to make your own version of this game, check out Udacity's newest course for beginners <a href="https://www.udacity.com/course/ud248" target="_blank">Make your own 2048</a>. No programming experience is required and in less than half an hour you'll dig into the source code, make some changes, and have your own version of the game to share.
</p>
<hr>
<p>
<strong class="important">Note:</strong> This site is the official version of 2048. You can play it on your phone via <a href="http://git.io/2048">http://git.io/2048.</a> All other apps or sites are derivatives or fakes, and should be used with caution.
<p class="game-explanation">
<strong class="important">How to play:</strong> Use your <strong>arrow keys</strong> to move the tiles. When two tiles with the same value touch, they <strong>merge into one!</strong>
</p>
<hr>
<p>
Created by <a href="http://gabrielecirulli.com" target="_blank">Gabriele Cirulli.</a> Based on <a href="https://itunes.apple.com/us/app/1024!/id823499224" target="_blank">1024 by Veewo Studio</a> and conceptually similar to <a href="http://asherv.com/threes/" target="_blank">Threes by Asher Vollmer.</a>
This is a modified version of the <a href="http://gabrielecirulli.github.io/2048/" target="_blank">original game</a> created by Gabriele Cirulli.
</p>
</div>

Expand All @@ -92,5 +110,7 @@ <h1 class="title">2048</h1>
<script src="js/local_storage_manager.js"></script>
<script src="js/game_manager.js"></script>
<script src="js/application.js"></script>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

</body>
</html>
5 changes: 5 additions & 0 deletions js/game_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ function GameManager(size, InputManager, Actuator, StorageManager) {
this.inputManager.on("move", this.move.bind(this));
this.inputManager.on("restart", this.restart.bind(this));
this.inputManager.on("keepPlaying", this.keepPlaying.bind(this));
this.inputManager.on("clearAll", this.clearAll.bind(this))

this.setup();
}
Expand All @@ -26,6 +27,10 @@ GameManager.prototype.keepPlaying = function () {
this.actuator.continueGame(); // Clear the game won/lost message
};

GameManager.prototype.clearAll = function () {
this.storageManager.clearHistory();
}

// Return true if the game is lost, or has won and the user hasn't kept playing
GameManager.prototype.isGameTerminated = function () {
if (this.over || (this.won && !this.keepPlaying)) {
Expand Down
42 changes: 41 additions & 1 deletion js/html_actuator.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ function HTMLActuator() {
this.scoreContainer = document.querySelector(".score-container");
this.bestContainer = document.querySelector(".best-container");
this.messageContainer = document.querySelector(".game-message");
this.sharingContainer = document.querySelector(".score-sharing");

this.score = 0;
}
Expand Down Expand Up @@ -37,6 +38,9 @@ HTMLActuator.prototype.actuate = function (grid, metadata) {

// Continues the game (both restart and keep playing)
HTMLActuator.prototype.continueGame = function () {
if (typeof ga !== "undefined") {
ga("send", "event", "game", "restart");
}
this.clearMessage();
};

Expand All @@ -47,10 +51,25 @@ HTMLActuator.prototype.clearContainer = function (container) {
};

HTMLActuator.prototype.addTile = function (tile) {
var valueMap = {
2 : '<Udacity>',
4 : '<Intro CS>',
8 : "skills=['code']",
16 : "skills.add('CSS')",
32 : '</Intro CS>',
64 : '<Job search>',
128 : 'getJob(skills)',
256 : '</Job search>',
512 : 'if Udacious:',
1024 : 'skills.increase()',
2048 : 'myJob.advance()',
4096 : 'myCareer=myJob'
}
var self = this;

var wrapper = document.createElement("div");
var inner = document.createElement("div");

var position = tile.previousPosition || { x: tile.x, y: tile.y };
var positionClass = this.positionClass(position);

Expand All @@ -62,7 +81,8 @@ HTMLActuator.prototype.addTile = function (tile) {
this.applyClasses(wrapper, classes);

inner.classList.add("tile-inner");
inner.textContent = tile.value;
//inner.textContent = tile.value;
inner.textContent = valueMap[tile.value];

if (tile.previousPosition) {
// Make sure that the tile gets rendered in the previous position first
Expand Down Expand Up @@ -128,12 +148,32 @@ HTMLActuator.prototype.message = function (won) {
var type = won ? "game-won" : "game-over";
var message = won ? "You win!" : "Game over!";

if (typeof ga !== "undefined") {
ga("send", "event", "game", "end", type, this.score);
}

this.messageContainer.classList.add(type);
this.messageContainer.getElementsByTagName("p")[0].textContent = message;

this.clearContainer(this.sharingContainer);
this.sharingContainer.appendChild(this.scoreTweetButton());
twttr.widgets.load();
};

HTMLActuator.prototype.clearMessage = function () {
// IE only takes one value to remove at a time.
this.messageContainer.classList.remove("game-won");
this.messageContainer.classList.remove("game-over");
};

HTMLActuator.prototype.scoreTweetButton = function () {
var tweet = document.createElement("a");
tweet.classList.add("twitter-share-button");
tweet.setAttribute("href", "https://twitter.com/share");
tweet.textContent = "Tweet";

var text = "" + this.score + " points in Udacity2048! http://ow.ly/vpoFS Code your own game in their new mini course http://ow.ly/vpaLY #2048game"
tweet.setAttribute("data-text", text);

return tweet;
};
19 changes: 14 additions & 5 deletions js/keyboard_input_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ KeyboardInputManager.prototype.listen = function () {
event.shiftKey;
var mapped = map[event.which];

// Ignore the event if it's happening in a text field
if (self.targetIsInput(event)) return;

if (!modifiers) {
if (mapped !== undefined) {
event.preventDefault();
Expand All @@ -71,16 +74,17 @@ KeyboardInputManager.prototype.listen = function () {
// Respond to button presses
this.bindButtonPress(".retry-button", this.restart);
this.bindButtonPress(".restart-button", this.restart);
this.bindButtonPress(".keep-playing-button", this.keepPlaying);
//this.bindButtonPress(".keep-playing-button", this.keepPlaying);

// Respond to swipe events
var touchStartClientX, touchStartClientY;
var gameContainer = document.getElementsByClassName("game-container")[0];

gameContainer.addEventListener(this.eventTouchstart, function (event) {
if ((!window.navigator.msPointerEnabled && event.touches.length > 1) ||
event.targetTouches > 1) {
return; // Ignore if touching with more than 1 finger
event.targetTouches > 1 ||
self.targetIsInput(event)) {
return; // Ignore if touching with more than 1 finger or touching input
}

if (window.navigator.msPointerEnabled) {
Expand All @@ -100,8 +104,9 @@ KeyboardInputManager.prototype.listen = function () {

gameContainer.addEventListener(this.eventTouchend, function (event) {
if ((!window.navigator.msPointerEnabled && event.touches.length > 0) ||
event.targetTouches > 0) {
return; // Ignore if still touching with one or more fingers
event.targetTouches > 0 ||
self.targetIsInput(event)) {
return; // Ignore if still touching with one or more fingers or input
}

var touchEndClientX, touchEndClientY;
Expand Down Expand Up @@ -142,3 +147,7 @@ KeyboardInputManager.prototype.bindButtonPress = function (selector, fn) {
button.addEventListener("click", fn.bind(this));
button.addEventListener(this.eventTouchend, fn.bind(this));
};

KeyboardInputManager.prototype.targetIsInput = function (event) {
return event.target.tagName.toLowerCase() === "input";
};
4 changes: 4 additions & 0 deletions js/local_storage_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@ LocalStorageManager.prototype.setGameState = function (gameState) {
LocalStorageManager.prototype.clearGameState = function () {
this.storage.removeItem(this.gameStateKey);
};

LocalStorageManager.prototype.clearHistory = function () {
this.storage.clear();
}
17 changes: 17 additions & 0 deletions meta/icon_bitcoin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions meta/icon_pp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added meta/og_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions style/helpers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@
}
}

// Appearance
@mixin appearance($args...) {
-webkit-appearance: $args;
-moz-appearance: $args;
appearance: $args;
}

// Clearfix
@mixin clearfix {
&:after {
Expand Down
Loading