Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
891d04c
commit 705e7c4
Showing
9 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Slot Machine | ||
|
||
A basic slot machine game logic, playable as it is, but customisable further, too: | ||
|
||
* Instantiate as many slot machines as you wish and specify a custom `selector`, `frameRate`, `maxBlur`, `hitDelay`, `superPrizeFigureIndex` and `keyToPress` | ||
* Instantiate as many slots as you wish and specify a custom `startAtFigureIndex` and `delay` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/** | ||
* Slot Machine | ||
* coded with ♥ by Niccolò Mineo | ||
* www.niccolomineo.com | ||
* © 2018 | ||
*/ | ||
|
||
body { | ||
cursor: default; | ||
margin: 0; | ||
} | ||
|
||
#slotmachine-container { | ||
background-color: darkgray; | ||
outline: 8px solid darkgray; | ||
height: 200px; | ||
overflow: hidden; | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%,-50%); | ||
opacity: 0; | ||
-webkit-animation: .5s fadeIn .5s forwards; | ||
-moz-animation: .5s fadeIn .5s forwards; | ||
-ms-animation: .5s fadeIn .5s forwards; | ||
-o-animation: .5s fadeIn .5s forwards; | ||
animation: .5s fadeIn .5s forwards; | ||
box-shadow: -24px -65px 0px 74px white, 0px 10px 80px 6px lightgray; | ||
} | ||
|
||
#slotmachine { | ||
margin-top: 40px; | ||
text-align: center; | ||
} | ||
|
||
#slotmachine ul { | ||
width: 200px; | ||
background-color: white; | ||
display: inline-block; | ||
list-style-type: none; | ||
padding-left: 0; | ||
} | ||
|
||
#slotmachine ul:not(:last-of-type) { | ||
padding-right: 5px; | ||
} | ||
|
||
#slotmachine ul li img { | ||
width: 100px; | ||
height: 100px; | ||
text-align: center; | ||
} | ||
|
||
@keyframes fadeIn { | ||
from { opacity: 0; } | ||
to { opacity: 1; } | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta name="robots" content="noindex,nofollow"/> | ||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/> | ||
<title>Slot Machine</title> | ||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=2.0"> | ||
<link rel="stylesheet" href="css/main.css" type="text/css" media="screen"/> | ||
</head> | ||
<body> | ||
<div id="slotmachine-container"> | ||
<div id="slotmachine"> | ||
<ul id="slot1"> | ||
<li><img src="img/slot1.png" /></li> | ||
<li><img src="img/slot2.png" /></li> | ||
<li><img src="img/slot3.png" /></li> | ||
<li><img src="img/slot4.png" /></li> | ||
<li><img src="img/slot5.png" /></li> | ||
<li><img src="img/slot6.png" /></li> | ||
</ul> | ||
<ul id="slot2"> | ||
<li><img src="img/slot1.png" /></li> | ||
<li><img src="img/slot2.png" /></li> | ||
<li><img src="img/slot3.png" /></li> | ||
<li><img src="img/slot4.png" /></li> | ||
<li><img src="img/slot5.png" /></li> | ||
<li><img src="img/slot6.png" /></li> | ||
</ul> | ||
<ul id="slot3"> | ||
<li><img src="img/slot1.png" /></li> | ||
<li><img src="img/slot2.png" /></li> | ||
<li><img src="img/slot3.png" /></li> | ||
<li><img src="img/slot4.png" /></li> | ||
<li><img src="img/slot5.png" /></li> | ||
<li><img src="img/slot6.png" /></li> | ||
</ul> | ||
</div> | ||
</div> | ||
<script src="js/main.js"></script> | ||
</body> | ||
</html> |