Uploading files

I still have no idea.
This commit is contained in:
Denis 2014-12-30 11:48:53 +02:00
parent 4bacc826d2
commit e2f662bd1b
27 changed files with 873 additions and 0 deletions

BIN
src/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

202
src/game.js Normal file
View file

@ -0,0 +1,202 @@
'use strict';
//General
var MOBILE_WIDH = 930;
var WINDOW_W = $(window).width();
// Sound initialization
ion.sound({
sounds: [{
name: "button_tiny",
volume: 0.8,
preload: true
}, {
name: "ta_da",
volume: 0.8,
preload: true
}, {
name: "sad_trombone",
volume: 0.8,
preload: true
}
],
volume: 0.5,
path: "./sound/sounds/",
preload: true
});
// Get word
// words array located in words.js
var word;
var incercari;
var missArray;
var charArray1;
var charArray2;
var missArray;
function newGame(wordList) {
word = wordList[Math.floor(Math.random() * wordList.length)];
incercari = 6;
charArray1 = [];
charArray2 = [];
missArray = [];
// Create the arrays
for (var i = 0; i < word.length; i++) {
charArray1[i] = '*';
}
for (var i = 0; i < word.length; i++) {
charArray2[i] = word.charAt(i);
}
// Update page info
$('.word').html(charArray1);
$("#human").attr('src', "./img/" + incercari + ".png");
$('#incercari').html(incercari);
$('.litera_msg2').html();
}
// DOM Elements & Events
$(document).ready(function() {
$('.footer-content').append("<p><span>Spanzuratoarea</span> <em>created by</em>" + "<span>@<a href=\"http://www.twitter.com/niutenisu\">Niutenisu</a></span><p>");
var listaCuvinte = localStorage.getItem("listaCuvinte");
if (listaCuvinte != null) {
$("select[name=lista_cuvinte]").val(listaCuvinte);
newGame(eval(listaCuvinte));
} else {
newGame(animale_eu);
}
$("select[name=lista_cuvinte]").on("change", function() {
localStorage.setItem("listaCuvinte", $(this).val());
}).next().click(function() {
// eval for transforming string into object ref!!!
newGame(eval($(this).prev().val())); // POSSIBLE EXPLOIT!!
// prev for mobile <3
});
$('#game').fadeIn("slow");
});
$(document).on("keypress", function(e) {
var key = e.keyCode || e.which;
var key2 = String.fromCharCode(key).toLowerCase();
ion.sound.play("button_tiny");
$('.litera_msg').fadeIn('slow');
$('.litera').html(key2);
//already guessed, check,
if (check(key2)) {
$('.litera_msg2').html("aceasta litera se afla in cuvant.");
updateArray(key2);
$('.word').html(charArray1);
} else {
$('.litera_msg2').html("aceasta litera nu se afla in cuvant.");
incercari--;
if (incercari > -1) {
$("#human").attr('src', "./img/" + incercari + ".png");
$('#incercari').html(incercari);
updateLetters(key2);
if (incercari == 0)
gameOver();
}
}
// check if arrays are equal
if (arraysEqual(charArray1, charArray2)) {
gameWon();
}
})
function gameWon() {
if (WINDOW_W <= MOBILE_WIDH) {
ion.sound.play("ta_da");
alert("Felicita e tenersi per mano")
window.location.reload(); // mobile
return;
}
//alert("You're winner!");
if (WINDOW_W > MOBILE_WIDH)
$('#gamewon').fadeIn('slow');
$(document).off(); // Detach keypress handler
ion.sound.play("ta_da"); // Play victory sound
$('#gamewon img').click(function() {
window.location.reload();
});
$(document).on("keypress", function(e) {
var key = e.keyCode || e.which;
if (key == 13)
window.location.reload(); // Da reset la handlere :-)
});
}
function gameOver() {
if (WINDOW_W <= MOBILE_WIDH) {
ion.sound.play("sad_trombone");
alert("Ai pierdut! CUVANT: " + word);
window.location.reload(); // for mobile phones
return; // for slower mobile phones
}
$('#incercari_msg').html("Game Over!");
$('#lose_word').html(word);
if (WINDOW_W > MOBILE_WIDH)
$('#gameover').fadeIn('slow');
$(document).off(); // Detach keypress handler
ion.sound.play("sad_trombone");
$('#gameover img').click(function() {
window.location.reload();
});
$(document).on("keypress", function(e) {
var key = e.keyCode || e.which;
if (key == 13)
window.location.reload();
});
}
function check(guess) {
return word.indexOf(guess) > -1;
}
function updateLetters(guess) {
var len = missArray.length;
if (!($.inArray(guess, missArray) > -1)) {
missArray[len] = guess;
}
$('.litere').html(missArray + " ");
}
function updateArray(guess) {
guess = guess.toLowerCase();
for (i = 0; i < charArray1.length; i++) {
if (charArray2[i] == guess) {
charArray1[i] = guess;
}
}
}
function arraysEqual(a, b) {
if (a === b) return true;
if (a == null || b == null) return false;
if (a.length != b.length) return false;
for (var i = 0; i < a.length; ++i) {
if (a[i] !== b[i]) return false;
}
return true;
}

1
src/game.min.js vendored Normal file
View file

@ -0,0 +1 @@
function newGame(a){for(word=a[Math.floor(Math.random()*a.length)],incercari=6,charArray1=[],charArray2=[],missArray=[],i=0;i<word.length;i++)charArray1[i]="*";for(i=0;i<word.length;i++)charArray2[i]=word.charAt(i);$(".word").html(charArray1),$("#human").attr("src","./img/"+incercari+".png"),$("#incercari").html(incercari),$(".litera_msg2").html()}function gameWon(){return MOBILE_WIDH>=WINDOW_W?(ion.sound.play("ta_da"),alert("Felicita e tenersi per mano"),void window.location.reload()):(WINDOW_W>MOBILE_WIDH&&$("#gamewon").fadeIn("slow"),$(document).off(),ion.sound.play("ta_da"),$("#gamewon img").click(function(){window.location.reload()}),void $(document).on("keypress",function(a){var r=a.keyCode||a.which;13==r&&window.location.reload()}))}function gameOver(){return MOBILE_WIDH>=WINDOW_W?(ion.sound.play("sad_trombone"),alert("Ai pierdut! CUVANT: "+word),void window.location.reload()):($("#incercari_msg").html("Game Over!"),$("#lose_word").html(word),WINDOW_W>MOBILE_WIDH&&$("#gameover").fadeIn("slow"),$(document).off(),ion.sound.play("sad_trombone"),$("#gameover img").click(function(){window.location.reload()}),void $(document).on("keypress",function(a){var r=a.keyCode||a.which;13==r&&window.location.reload()}))}function check(a){return word.indexOf(a)>-1}function updateLetters(a){var r=missArray.length;$.inArray(a,missArray)>-1||(missArray[r]=a),$(".litere").html(missArray+" ")}function updateArray(a){for(a=a.toLowerCase(),i=0;i<charArray1.length;i++)charArray2[i]==a&&(charArray1[i]=a)}function arraysEqual(a,r){if(a===r)return!0;if(null==a||null==r)return!1;if(a.length!=r.length)return!1;for(var e=0;e<a.length;++e)if(a[e]!==r[e])return!1;return!0}var MOBILE_WIDH=930,WINDOW_W=$(window).width();ion.sound({sounds:[{name:"button_tiny",volume:.8,preload:!0},{name:"ta_da",volume:.8,preload:!0},{name:"sad_trombone",volume:.8,preload:!0}],volume:.5,path:"./sound/sounds/",preload:!0});var word,incercari,missArray,charArray1,charArray2,missArray;$(document).ready(function(){$(".footer-content").append('<p><span>Spanzuratoarea</span> <em>created by</em><span>@<a href="http://www.twitter.com/niutenisu">Niutenisu</a></span><p>');var listaCuvinte=localStorage.getItem("listaCuvinte");null!=listaCuvinte?($("select[name=lista_cuvinte]").val(listaCuvinte),newGame(eval(listaCuvinte))):newGame(animale_eu),$("select[name=lista_cuvinte]").on("change",function(){localStorage.setItem("listaCuvinte",$(this).val())}).next().click(function(){newGame(eval($(this).prev().val()))}),$("#game").fadeIn("slow")}),$(document).on("keypress",function(a){var r=a.keyCode||a.which,e=String.fromCharCode(r).toLowerCase();ion.sound.play("button_tiny"),$(".litera_msg").fadeIn("slow"),$(".litera").html(e),check(e)?($(".litera_msg2").html("aceasta litera se afla in cuvant."),updateArray(e),$(".word").html(charArray1)):($(".litera_msg2").html("aceasta litera nu se afla in cuvant."),incercari--,incercari>-1&&($("#human").attr("src","./img/"+incercari+".png"),$("#incercari").html(incercari),updateLetters(e),0==incercari&&gameOver())),arraysEqual(charArray1,charArray2)&&gameWon()});

122
src/hangman2.html Normal file
View file

@ -0,0 +1,122 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Spanzuratoarea</title>
<meta charset="utf-8">
<meta name="author" content="Niutenisu">
<meta name="description" content="Spanzuratoarea in limba romana!">
<meta name="keywords" content="spanzuratoarea, joc, gratuit, romana">
<meta name="viewport" content="width=device-width, initial-scale=0.9">
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" type="text/css" href="styles.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="./sound/ion.sound.min.js"></script>
<script src="./words.js"></script>
<script src="./game.js"></script>
</head>
<body>
<div id="content">
<h1>Spanzuratoarea!</h1>
<div id="game" class="game" style="display: none;">
<div class="mobile">
<h3>Incearca sa ghicesti cuvantul: <span class="word"></span></h3>
<h4>Introdu aici litera:</h4>
<input name="mobile" type="text">
<h4 class="litera_msg" style="display: none;">Ai apasat pe "
<span class="litera" style="color: red;"></span>
<span class="litera_msg2"></span>"</h4>
<h4 class="litere" style="color: red;"></h4>
<select name="lista_cuvinte" class="change_words">
<option value="animale_eu">Animale din Europa</option>
<option value="tari_eu">Tari din Europa</option>
<option value="firme">Companii</option>
<option value="ldp">Limbaje de programare</option>
</select>
<button class="">Schimba</button>
</div>
<div id="left">
<h2>Incearca sa ghicesti cuvantul: <span class="word"></span></h2>
<h3>Apasa pe o litera de pe tastatura!</h3>
<br>
<h4 class="litera_msg" style="display: none;">Ai apasat pe "
<span class="litera red" style="color: red;"></span>
"<span class="litera_msg2"></span>"</h4>
<br>
<br>
<br>
<h4>Instructiuni:</h4>
<p>Incearca sa ghicesti cuvantul! Ai 6 incercari pana cand vei fi spanzurat</p>
<br>
<br>
<h4 class="litere red"></h4>
<br>
<br>
<h4>Cuvinte:</h4>
<select name="lista_cuvinte" class="change_words">
<option value="animale_eu">Animale din Europa</option>
<option value="tari_eu">Tari din Europa</option>
<option value="firme">Companii</option>
<option value="ldp">Limbaje de programare</option>
</select>
<button class="">Schimba</button>
</div>
<div id="gamewon">
<p>Da-i click pe imagine pentru a juca din nou!</p>
<img src="./img/win.png" alt="Winner!" title="YOU'RE WINNER!">
</div>
<div id="gameover">
<p>Da-i click pe imagine pentru a juca din nou!</p>
<p>Cuvantul era: <span class="red" id="lose_word"></span>
</p>
<img src="./img/lose.png" alt="Loser!" title="YOU'RE LOSER!">
</div>
<div id="right">
<img id="hang" src="./img/hang.png">
<img id="human" src="./img/6.png">
<br>
<h3 id="incercari_msg">Incercari ramase: <span id="incercari">6</span></h3>
</div>
</div>
</div>
<footer>
<div class="footer-content">
</div>
</footer>
<!--
<script type="text/javascript">
if (window.jQuery) {
// jQuery is loaded
alert("jQuery is loaded");
} else {
// jQuery is not loaded
alert("jQuery is not loaded");
</script>
}-->
</body>
</html>

BIN
src/img/0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

BIN
src/img/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
src/img/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
src/img/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
src/img/4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
src/img/5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

BIN
src/img/6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 934 B

BIN
src/img/hang.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
src/img/lose.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
src/img/win.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

345
src/sound/ion.sound.js Normal file
View file

@ -0,0 +1,345 @@
/**
* Ion.Sound
* version 2.1.3 Build 47
* © 2014 Denis Ineshin | IonDen.com
*
* Project page: http://ionden.com/a/plugins/ion.sound/en.html
* GitHub page: https://github.com/IonDen/ion.sound
*
* Released under MIT licence:
* http://ionden.com/a/plugins/licence-en.html
*/
var ion = ion || {};
(function (ion) {
var warn = function (text) {
if (text && console) {
if (console.warn && typeof console.warn === "function") {
console.warn(text);
} else if (console.log && typeof console.log === "function") {
console.log(text);
}
}
};
if (ion.sound) {
warn("ion.sound already exists!");
return;
}
if (typeof Audio !== "function" && typeof Audio !== "object") {
var func = function () {
warn("HTML5 Audio is not supported in this browser");
};
ion.sound = function () {};
ion.sound.play = func;
ion.sound.stop = func;
ion.sound.destroy = func;
func();
return;
}
var Sound,
is_iOS = /iPad|iPhone/.test(navigator.appVersion),
global_sound,
settings = {},
sounds = {},
sounds_num,
ext,
i;
if (is_iOS) {
Sound = function (options) {
this.name = options.name;
this.loop = false;
this.paused = false;
this.sound = null;
this.callback = null;
};
Sound.prototype = {
init: function () {
this.sound = global_sound;
},
play: function (obj) {
if (!obj) {
obj = {};
}
if (obj.loop) {
if (this.paused) {
this._playLoop(this.loop + 1);
} else {
this._playLoop(obj.loop);
}
} else {
this.loop = false;
this._play();
}
if (obj.onEnded && typeof obj.onEnded === "function") {
this.callback = obj.onEnded;
}
},
_play: function () {
if (this.paused) {
this.paused = false;
} else {
try {
this.sound.currentTime = 0;
} catch (e) {}
}
this.sound.removeEventListener("ended");
this.sound.addEventListener("ended", this._ended.bind(this), false);
this.sound.src = settings.path + this.name + ext;
this.sound.load();
this.sound.play();
}
}
} else {
Sound = function (options) {
this.name = options.name;
this.volume = settings.volume || 0.5;
this.preload = settings.preload ? "auto" : "none";
this.loop = false;
this.paused = false;
this.sound = null;
this.callback = null;
if ("volume" in options) {
this.volume = +options.volume;
}
if ("preload" in options) {
this.preload = options.preload ? "auto" : "none"
}
};
Sound.prototype = {
init: function () {
this.sound = new Audio();
this.sound.src = settings.path + this.name + ext;
this.sound.load();
this.sound.preload = this.preload;
this.sound.volume = this.volume;
this.sound.addEventListener("ended", this._ended.bind(this), false);
},
play: function (obj) {
if (!obj) {
obj = {};
}
if (obj.volume || obj.volume === 0) {
this.volume = +obj.volume;
this.sound.volume = this.volume;
}
if (obj.loop) {
if (this.paused) {
this._playLoop(this.loop + 1);
} else {
this._playLoop(obj.loop);
}
} else {
this.loop = false;
this._play();
}
if (obj.onEnded && typeof obj.onEnded === "function") {
this.callback = obj.onEnded;
}
},
_play: function () {
if (this.paused) {
this.paused = false;
} else {
try {
this.sound.currentTime = 0;
} catch (e) {}
}
this.sound.play();
}
};
}
Sound.prototype._playLoop = function (loop) {
if (typeof loop === "boolean") {
// FF 3.6 and iOS,
// sound.loop = true not supported or buggy
this.loop = 9999999;
this._play();
} else if (typeof loop === "number") {
this.loop = loop - 1;
this._play();
}
};
Sound.prototype._ended = function () {
if (this.loop > 0) {
this.loop -= 1;
this._play();
}
if (this.callback) {
this.callback(this.name);
}
};
Sound.prototype.pause = function () {
this.paused = true;
this.sound.pause();
};
Sound.prototype.stop = function () {
this.loop = false;
this.sound.pause();
try {
this.sound.currentTime = 0;
} catch (e) {}
};
Sound.prototype.destroy = function () {
this.stop();
this.sound.removeEventListener("ended", this._ended.bind(this), false);
this.sound.src = "";
this.sound = null;
};
var checkSupport = function () {
global_sound = new Audio();
var can_play_mp3 = global_sound.canPlayType('audio/mpeg'),
can_play_ogg = global_sound.canPlayType('audio/ogg'),
can_play_aac = global_sound.canPlayType('audio/mp4; codecs="mp4a.40.2"');
if (is_iOS) {
if (can_play_mp3 === "probably") {
ext = ".mp3";
} else if (can_play_aac === "probably") {
ext = ".aac";
} else if (can_play_mp3 === "maybe") {
ext = ".mp3";
} else if (can_play_aac === "maybe") {
ext = ".aac";
}
} else {
if (can_play_mp3 === "probably") {
ext = ".mp3";
} else if (can_play_ogg === "probably") {
ext = ".ogg";
} else if (can_play_mp3 === "maybe") {
ext = ".mp3";
} else if (can_play_ogg === "maybe") {
ext = ".ogg";
} else {
ext = ".wav";
}
}
};
var createSound = function (obj) {
sounds[obj.name] = new Sound(obj);
sounds[obj.name].init();
};
ion.sound = function (options) {
settings = JSON.parse(JSON.stringify(options));
settings.path = settings.path || "";
settings.volume = settings.volume || 0.5;
settings.preload = settings.preload || false;
settings.mix = settings.mix || true;
sounds_num = settings.sounds.length;
if (!sounds_num) {
warn("No sound-files provided!");
return;
}
checkSupport();
for (i = 0; i < sounds_num; i++) {
createSound(settings.sounds[i]);
}
};
ion.sound.version = "2.1.3";
ion.sound.play = function (name, options) {
if (sounds[name]) {
sounds[name].play(options);
}
};
ion.sound.pause = function (name) {
if (name && sounds[name]) {
sounds[name].pause();
} else {
for (i in sounds) {
if (!sounds.hasOwnProperty(i)) {
continue;
}
if (sounds[i]) {
sounds[i].pause();
}
}
}
};
ion.sound.stop = function (name) {
if (name && sounds[name]) {
sounds[name].stop();
} else {
for (i in sounds) {
if (!sounds.hasOwnProperty(i)) {
continue;
}
if (sounds[i]) {
sounds[i].stop();
}
}
}
};
ion.sound.destroy = function (name) {
if (name && sounds[name]) {
sounds[name].destroy();
sounds[name] = null;
} else {
for (i in sounds) {
if (!sounds.hasOwnProperty(i)) {
continue;
}
if (sounds[i]) {
sounds[i].destroy();
sounds[i] = null;
}
}
}
};
} (ion));

2
src/sound/ion.sound.min.js vendored Normal file
View file

@ -0,0 +1,2 @@
// Ion.Sound | version 2.1.3 | https://github.com/IonDen/ion.sound
var ion=ion||{};(function(e){var l=function(a){a&&console&&(console.warn&&"function"===typeof console.warn?console.warn(a):console.log&&"function"===typeof console.log&&console.log(a))};if(e.sound)l("ion.sound already exists!");else if("function"!==typeof Audio&&"object"!==typeof Audio){var g=function(){l("HTML5 Audio is not supported in this browser")};e.sound=function(){};e.sound.play=g;e.sound.stop=g;e.sound.destroy=g;g()}else{var f,m=/iPad|iPhone/.test(navigator.appVersion),k,d={},b={},n,h,c;m?(f=function(a){this.name=a.name;this.paused=this.loop=!1;this.callback=this.sound=null},f.prototype={init:function(){this.sound=k},play:function(a){a||(a={});a.loop?this.paused?this._playLoop(this.loop+1):this._playLoop(a.loop):(this.loop=!1,this._play());a.onEnded&&"function"===typeof a.onEnded&&(this.callback=a.onEnded)},_play:function(){if(this.paused)this.paused=!1;else try{this.sound.currentTime=0}catch(a){}this.sound.removeEventListener("ended");this.sound.addEventListener("ended",this._ended.bind(this),!1);this.sound.src=d.path+this.name+h;this.sound.load();this.sound.play()}}):(f=function(a){this.name=a.name;this.volume=d.volume||.5;this.preload=d.preload?"auto":"none";this.paused=this.loop=!1;this.callback=this.sound=null;"volume"in a&&(this.volume=+a.volume);"preload"in a&&(this.preload=a.preload?"auto":"none")},f.prototype={init:function(){this.sound=new Audio;this.sound.src=d.path+this.name+h;this.sound.load();this.sound.preload=this.preload;this.sound.volume=this.volume;this.sound.addEventListener("ended",this._ended.bind(this),!1)},play:function(a){a||(a={});if(a.volume||0===a.volume)this.volume=+a.volume,this.sound.volume=this.volume;a.loop?this.paused?this._playLoop(this.loop+1):this._playLoop(a.loop):(this.loop=!1,this._play());a.onEnded&&"function"===typeof a.onEnded&&(this.callback=a.onEnded)},_play:function(){if(this.paused)this.paused=!1;else try{this.sound.currentTime=0}catch(a){}this.sound.play()}});f.prototype._playLoop=function(a){"boolean"===typeof a?(this.loop=9999999,this._play()):"number"===typeof a&&(this.loop=a-1,this._play())};f.prototype._ended=function(){0<this.loop&&(--this.loop,this._play());this.callback&&this.callback(this.name)};f.prototype.pause=function(){this.paused=!0;this.sound.pause()};f.prototype.stop=function(){this.loop=!1;this.sound.pause();try{this.sound.currentTime=0}catch(a){}};f.prototype.destroy=function(){this.stop();this.sound.removeEventListener("ended",this._ended.bind(this),!1);this.sound.src="";this.sound=null};e.sound=function(a){d=JSON.parse(JSON.stringify(a));d.path=d.path||"";d.volume=d.volume||.5;d.preload=d.preload||!1;d.mix=d.mix||!0;if(n=d.sounds.length){k=new Audio;a=k.canPlayType("audio/mpeg");var e=k.canPlayType("audio/ogg"),g=k.canPlayType('audio/mp4; codecs="mp4a.40.2"');m?"probably"===a?h=".mp3":"probably"===g?h=".aac":"maybe"===a?h=".mp3":"maybe"===g&&(h=".aac"):h="probably"===a?".mp3":"probably"===e?".ogg":"maybe"===a?".mp3":"maybe"===e?".ogg":".wav";for(c=0;c<n;c++)a=d.sounds[c],b[a.name]=new f(a),b[a.name].init()}else l("No sound-files provided!")};e.sound.version="2.1.3";e.sound.play=function(a,c){b[a]&&b[a].play(c)};e.sound.pause=function(a){if(a&&b[a])b[a].pause();else for(c in b)b.hasOwnProperty(c)&&b[c]&&b[c].pause()};e.sound.stop=function(a){if(a&&b[a])b[a].stop();else for(c in b)b.hasOwnProperty(c)&&b[c]&&b[c].stop()};e.sound.destroy=function(a){if(a&&b[a])b[a].destroy(),b[a]=null;else for(c in b)b.hasOwnProperty(c)&&b[c]&&(b[c].destroy(),b[c]=null)}}})(ion);

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
src/sound/sounds/ta_da.aac Normal file

Binary file not shown.

BIN
src/sound/sounds/ta_da.mp3 Normal file

Binary file not shown.

BIN
src/sound/sounds/ta_da.ogg Normal file

Binary file not shown.

194
src/styles.css Normal file
View file

@ -0,0 +1,194 @@
* {
margin: 0;
padding: 0;
}
html,
body {
height: 100%;
}
body {
background-color: #eef7fb;
}
h1 {
text-align: center;
text-overflow: ellipsis;
-webkit-text-stroke: 1px #375449;
-moz-text-stroke: 1px #375449;
-o-text-stroke: 1px #375449;
text-stroke: 1px #375449;
font-family: "Arial Black", Gadget, sans-serif;
font-style: oblique;
font-variant: small-caps;
font-size: 50px;
color: #8AD4B8;
}
h2,
h4 {
color: #224557;
}
h3,
h5 {
color: #3b7998;
}
footer,
#content:after {
height: 50px;
}
a {
text-decoration: none;
font-family: "Trebuchet MS", sans-serif, Helvetica, Verdana, Arial;
color: #e9f5fa;
font-size: 15px;
}
a:hover {
color: #abd9ec;
text-decoration: underline;
-webkit-transition: color 0.5s;
-moz-transition: color 0.5s;
-o-transition: color 0.5s;
transition: color 0.5s;
}
footer {
font-family: sans-serif, Helvetica, Arial;
color: #c9e7f3;
background-color: #8aa3c8;
}
.game p {
color: #448aae;
}
.game {
padding: 30px;
margin: 20px 80px 20px;
height: 400px;
border: solid 5px black;
background-color: #C9E7F3;
border-radius: 20px;
font-family: sans-serif, Helvetica, Verdana, Arial;
text-overflow: ellipsis;
}
#content {
min-height: 100%;
/* equal to footer height */
margin-bottom: -50px;
}
#left {
float: left;
display: inline-block;
}
#right {
float: right;
margin-right: 20px;
display: inline-block;
}
#content:after {
content: "";
display: block;
}
#incercari_msg {
margin-top: 340px;
margin-right: 40px;
overflow: hidden;
}
#gamewon {
position: absolute;
display: none;
border: 2px solid #636d92;
border-radius: 30px;
height: 380px;
background-color: #a6b7f4;
z-index: 2;
top: 18%;
left: 35%;
}
#gamewon img {
z-index: 2;
height: 340px;
border-radius: 30px;
}
#gamewon p {
padding: 10px;
font-weight: bold;
text-align: center;
}
#gameover {
position: absolute;
display: none;
border: 2px solid #636d92;
border-radius: 30px;
height: 380px;
width: 350px;
background-color: #a6b7f4;
z-index: 2;
top: 18%;
left: 35%;
}
#gameover img {
z-index: 2;
height: 330px;
border-radius: 30px;
}
#gameover p:first-child {
padding-top: 10px;
}
#gameover p {
font-weight: bold;
text-align: center;
}
.red {
color: red;
font-weight: bold;
text-transform: uppercase;
}
#hang {
position: absolute;
top: 145px;
right: 133px;
}
#human {
position: absolute;
top: 190px;
right: 108px;
}
.footer-content {
margin: 0px 10px 0px 10px;
padding-top: 15px;
}
.footer-content span {
color: #e9f5fa;
font-weight: bold;
}
.mobile {
display: none;
}
/* Mobile shit */
@media only screen and (max-width: 930px) {
.mobile {
display: inline;
}
.mobile input {
-webkit-box-sizing: border-box;
/* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box;
/* Firefox, other Gecko */
box-sizing: border-box;
/* Opera/IE 8+ */
}
#incercari_msg {
padding-top: 5px;
margin: 0px;
}
#game {
min-width: 20%;
}
#left,
#hang,
#human,
#gamover,
#gamewon {
display: none;
}
}

7
src/words.js Normal file
View file

@ -0,0 +1,7 @@
var animale_eu = ["pisica", "caine", "lup", "vulpe", "urs", "caprioara", "vaca", "cal", "oaie", "sobolan", "soarece"];
var tari_eu = ["romania", "moldova", "germania", "spania", "franta", "rusia","italia", "elvetia", "suedia", "norvegia"];
var firme = ["google", "yahoo", "microsoft", "oracle", "amazon", "emag", "ebay", "apple", "siemens", "intel", "toyota", "dacia", "volvo"];
var ldp = ["javascript", "html", "css", "java", "c", "c++", "ruby", "pascal", "lisp", "erlang", "sql", "python"];