mirror of
https://github.com/Febbweiss/febbweiss.github.io.git
synced 2026-03-05 06:35:50 +00:00
Refactoring: manage generated static site
This commit is contained in:
12
extra/js/pacman.js
Normal file
12
extra/js/pacman.js
Normal file
@@ -0,0 +1,12 @@
|
||||
$(document).ready(function() {
|
||||
$('#startBtn').on('click', function(event) {
|
||||
for( var i = 1; i < 4; i++) {
|
||||
$("#life" + i).css('opacity', '100');
|
||||
$("#life" + i).show();
|
||||
}
|
||||
SCOREBOARD.score = Game.score = 0;
|
||||
Game.level = -1;
|
||||
Game.lives = 3;
|
||||
Game.init();
|
||||
});
|
||||
});
|
||||
11
extra/js/pyramid.js
Normal file
11
extra/js/pyramid.js
Normal file
@@ -0,0 +1,11 @@
|
||||
$(document).ready(function() {
|
||||
$('#startBtn').on('click', function(event) {
|
||||
for( var i = 0; i < 52; i++ ) {
|
||||
Deck.cards[i] = i +1;
|
||||
}
|
||||
$('img[id^="card"]').remove();
|
||||
$("#drawn").removeClass();
|
||||
$("#stock").addClass("card").addClass("background");
|
||||
Pyramid.init();
|
||||
});
|
||||
});
|
||||
23
extra/js/sis.js
Normal file
23
extra/js/sis.js
Normal file
@@ -0,0 +1,23 @@
|
||||
$(document).ready(function() {
|
||||
$('#startBtn').on('click', function(event) {
|
||||
Game.running = false;
|
||||
Game.wave_index = -1;
|
||||
Game.wave = undefined;
|
||||
Game.aliens = [];
|
||||
Game.ship = null;
|
||||
Game.score = 0;
|
||||
Game.shots = {
|
||||
total : 0,
|
||||
lost : 0
|
||||
};
|
||||
Game.init();
|
||||
$.loadCallback(function(percent){
|
||||
$("#loadingBar").width(400*percent);
|
||||
});
|
||||
$.playground().startGame(
|
||||
function() {
|
||||
$("#welcomeScreen").remove();
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
10
extra/js/yahtzee.js
Normal file
10
extra/js/yahtzee.js
Normal file
@@ -0,0 +1,10 @@
|
||||
$(document).ready(function() {
|
||||
$('#startBtn').on('click', function(event) {
|
||||
Yahtzee.clear(true);
|
||||
Yahtzee.scoreUp = Yahtzee.scoreDown = 0;
|
||||
$('span[id$="Score"]').html(' ');
|
||||
$("#scorePanel").hide();
|
||||
$("#launch").html(0);
|
||||
$("#launchBtn").removeClass("disabled");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user