clean script created

This commit is contained in:
garrettdreyfus 2014-05-25 10:51:25 -04:00
parent 2b52b64165
commit bf3c247533
4 changed files with 25 additions and 10 deletions

2
clean.sh Executable file
View file

@ -0,0 +1,2 @@
for file in $(find . -type f -name "*.js"); do touch filename2; grep -v "debugger\|console" $file > filename2; mv filename2 $file; done;

View file

@ -4,4 +4,4 @@ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-51272720-1', 'teamsnowman.github.io');
ga('send', 'pageview');
ga('send', 'pageview');

View file

@ -68,7 +68,6 @@ var gameState = 0;
var framerate = 60;
var history = {};
var score = 0;
var scoreScalar = 1;
var isGameOver = 3;
var scoreAdditionCoeff = 1;
var prevScore = 0;
@ -102,7 +101,6 @@ function init() {
score = 0;
prevScore = 0;
spawnLane = 0;
scoreScalar = 1;
gameState = -2;
count = 0;
blocks = [];
@ -158,12 +156,6 @@ function exportHistory() {
//remember to update history function to show the respective iter speeds
function update() {
var now = Date.now();
if (now - prevTimeScored > 1000) {
score += 5 * (scoreScalar * scoreAdditionCoeff);
prevTimeScored = now;
}
if (importing) {
if (importedHistory[count]) {
if (importedHistory[count].block) {
@ -179,7 +171,6 @@ function update() {
else if (gameState == 1) {
waveone.update();
if (now - waveone.prevTimeScored > 1000) {
score += 5 * (scoreScalar * scoreAdditionCoeff);
waveone.prevTimeScored = now;
}
}

22
js/test.js Normal file
View file

@ -0,0 +1,22 @@
asdfjhasdf
asdf
as
df
a
sdf
asdfasdf
as
df
as
df
asd
fa
sdf
asdf
a
sdf
asd
f
asdf
a
sdf