Pass lint

This commit is contained in:
Eric Fredricksen
2010-07-05 21:37:06 -07:00
parent 2a6db39215
commit 92c28d670f
5 changed files with 11 additions and 10 deletions
+4 -5
View File
@@ -35,7 +35,7 @@ function Alea() {
var s2 = 0;
var c = 1;
if (args.length == 0) {
if (!args.length) {
args = [+new Date];
}
var mash = Mash();
@@ -80,14 +80,13 @@ function Alea() {
s1 = newstate[1];
s2 = newstate[2];
c = newstate[3];
} else {
return [s0,s1,s2,c];
}
return [s0,s1,s2,c];
};
return random;
} (Array.prototype.slice.call(arguments)));
};
}
var seed = new Alea();
@@ -127,7 +126,7 @@ function loadRoster() {
try {
return JSON.parse(r);
} catch (err) {
return {}
return {};
}
}
}
Regular → Executable
+1 -1
View File
@@ -1,4 +1,4 @@
#
#!/usr/bin/env jsl -conf
# Configuration File for JavaScript Lint 0.3.0
# Developed by Matthias Miller (http://www.JavaScriptLint.com)
#
+2 -1
View File
@@ -1173,10 +1173,11 @@ function HotOrNot() {
// Figure out which spell is best
var flat = 1; // Flattening constant
var best = 0, i;
for (i = 1; i < Spells.length(); ++i)
for (i = 1; i < Spells.length(); ++i) {
if ((i+flat) * toArabic(Get(Spells,i)) >
(best+flat) * toArabic(Get(Spells,best)))
best = i;
}
game.Spells.best = Spells.label(best) + ' ' + Get(Spells, best);
/// And which stat is best?
+1 -1
View File
@@ -142,7 +142,7 @@ function sold() {
name: $("#Name").val(),
race: $("input:radio[name=Race]:checked").val(),
'class': $("input:radio[name=Class]:checked").val(),
seed: stats.seed,
seed: stats.seed
};
$.each('STR,CON,DEX,INT,WIS,CHA'.split(','), function (index,value) {
newguy[value] = stats[value];
+3 -2
View File
@@ -6,7 +6,7 @@ $(document).ready(function () {
var roster = $("#roster");
roster.empty();
games = loadRoster()
games = loadRoster();
if (!games) {
roster.text("Err...no local storage");
return;
@@ -16,7 +16,7 @@ $(document).ready(function () {
var br = brag(c);
roster.append(br);
br.find("a").attr("href", "main.html#" + name)
br.find("a").attr("href", "main.html#" + name);
br.find("button").click(function () {
if (confirm("Terminate " + Pick(["faithful","noble","loyal","brave"])+
@@ -60,6 +60,7 @@ $(document).ready(function () {
$.each(p1.split("."), function (i,v) {
if (!dict) return true;
dict = dict[v];
return null;
});
return dict || '';
});