Skip to content

Commit

Permalink
machine-ized
Browse files Browse the repository at this point in the history
  • Loading branch information
asheehandm committed Apr 1, 2014
1 parent 2798bb0 commit a7ecaf0
Show file tree
Hide file tree
Showing 19 changed files with 54 additions and 37 deletions.
18 changes: 18 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>machine2048</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.aptana.ide.core.unifiedBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.aptana.projects.webnature</nature>
<nature>com.aptana.ruby.core.rubynature</nature>
</natures>
</projectDescription>
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 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).
# machine 2048
A mod of 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).

Made just for fun. [Play it here!](http://gabrielecirulli.github.io/2048/)
Made just for fun. [Play it here!](http://asheehan.github.io/machine2048/)

### Contributions

Expand All @@ -18,15 +18,12 @@ Many thanks to [rayhaanj](https://github.com/rayhaanj), [Mechazawa](https://gith
<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:
That screenshot is fake, by the way. I never reached Walden :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)
You can find the same information in the [contributing guide.](https://github.com/asheehan/machinee2048/blob/master/CONTRIBUTING.md)

## 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!
machine2048 is licensed under the [MIT license.](https://github.com/asheehan/machine2048/blob/master/LICENSE.txt)
Binary file added images/players/aj.jpg
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 images/players/beamer.jpg
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 images/players/bob.jpg
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 images/players/cullen.jpg
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 images/players/cullen3.jpg
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 images/players/dane.jpg
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 images/players/george.jpg
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 images/players/kk.jpg
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 images/players/michael.jpg
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 images/players/neal.jpg
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 images/players/sheehan.jpg
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 images/players/stephan.jpg
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 images/players/walden.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<title>2048</title>
<title>Machine2048</title>

<link href="style/main.css" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="favicon.ico">
Expand All @@ -16,15 +16,15 @@
<body>
<div class="container">
<div class="heading">
<h1 class="title">2048</h1>
<h1 class="title">Machine2048</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">Join the numbers and get to the <strong>Walden tile!</strong></p>
<a class="restart-button">New Game</a>
</div>

Expand Down Expand Up @@ -70,15 +70,15 @@ <h1 class="title">2048</h1>
</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">How to play:</strong> Use your <strong>arrow keys</strong> to move the tiles. When two tiles with the same player touch, they <strong>merge into one!</strong>
</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.
<strong class="important">Note:</strong> This site is the official version of Machine 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>
<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>
Modified by <a href="http://github.com/asheehan">Andrew Sheehan</a>. 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>
</p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion js/game_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ GameManager.prototype.addStartTiles = function () {
// Adds a tile in a random position
GameManager.prototype.addRandomTile = function () {
if (this.grid.cellsAvailable()) {
var value = Math.random() < 0.9 ? 2 : 4;
var value = Math.random() < 0.7 ? 2 : 4;
var tile = new Tile(this.grid.randomAvailableCell(), value);

this.grid.insertTile(tile);
Expand Down
2 changes: 1 addition & 1 deletion js/html_actuator.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ HTMLActuator.prototype.addTile = function (tile) {
this.applyClasses(wrapper, classes);

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

if (tile.previousPosition) {
// Make sure that the tile gets rendered in the previous position first
Expand Down
42 changes: 22 additions & 20 deletions style/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -313,65 +313,67 @@ hr {
z-index: 10;
font-size: 55px; }
.tile.tile-2 .tile-inner {
background: #eee4da;
background: #eee4da url('../images/players/michael.jpg');
background-size: cover;
box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0), inset 0 0 0 1px rgba(255, 255, 255, 0); }
.tile.tile-4 .tile-inner {
background: #ede0c8;
background: #ede0c8 url('../images/players/stephan.jpg');
background-size: cover;
box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0), inset 0 0 0 1px rgba(255, 255, 255, 0); }
.tile.tile-8 .tile-inner {
color: #f9f6f2;
background: #f2b179; }
background: #f2b179 url('../images/players/george.jpg');
background-size: cover; }
.tile.tile-16 .tile-inner {
color: #f9f6f2;
background: #f59563; }
background: #f59563 url('../images/players/dane.jpg');
background-size: cover; }
.tile.tile-32 .tile-inner {
color: #f9f6f2;
background: #f67c5f; }
background: #f67c5f url('../images/players/bob.jpg');
background-size: cover; }
.tile.tile-64 .tile-inner {
color: #f9f6f2;
background: #f65e3b; }
background: #f65e3b url('../images/players/neal.jpg');
background-size: cover; }
.tile.tile-128 .tile-inner {
color: #f9f6f2;
background: #edcf72;
background: #edcf72 url('../images/players/cullen.jpg');
background-size: cover;
box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.2381), inset 0 0 0 1px rgba(255, 255, 255, 0.14286);
font-size: 45px; }
@media screen and (max-width: 520px) {
.tile.tile-128 .tile-inner {
font-size: 25px; } }
.tile.tile-256 .tile-inner {
color: #f9f6f2;
background: #edcc61;
background: #edcc61 url('../images/players/aj.jpg');
background-size: cover;
box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.31746), inset 0 0 0 1px rgba(255, 255, 255, 0.19048);
font-size: 45px; }
@media screen and (max-width: 520px) {
.tile.tile-256 .tile-inner {
font-size: 25px; } }
.tile.tile-512 .tile-inner {
color: #f9f6f2;
background: #edc850;
background: #edc850 url('../images/players/beamer.jpg');
background-size: cover;
box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.39683), inset 0 0 0 1px rgba(255, 255, 255, 0.2381);
font-size: 45px; }
@media screen and (max-width: 520px) {
.tile.tile-512 .tile-inner {
font-size: 25px; } }
.tile.tile-1024 .tile-inner {
color: #f9f6f2;
background: #edc53f;
background: #edc53f url('../images/players/sheehan.jpg');
background-size: cover;
box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.47619), inset 0 0 0 1px rgba(255, 255, 255, 0.28571);
font-size: 35px; }
@media screen and (max-width: 520px) {
.tile.tile-1024 .tile-inner {
font-size: 15px; } }
.tile.tile-2048 .tile-inner {
color: #f9f6f2;
background: #edc22e;
background: #edc22e url('../images/players/walden.jpg');
background-size: cover;
box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.55556), inset 0 0 0 1px rgba(255, 255, 255, 0.33333);
font-size: 35px; }
@media screen and (max-width: 520px) {
.tile.tile-2048 .tile-inner {
font-size: 15px; } }
.tile.tile-super .tile-inner {
color: #f9f6f2;
background: #3c3a32;
font-size: 30px; }
@media screen and (max-width: 520px) {
Expand Down

0 comments on commit a7ecaf0

Please sign in to comment.