Skip to content

Commit

Permalink
rm some unneeded toString()
Browse files Browse the repository at this point in the history
  • Loading branch information
fohristiwhirl committed Oct 4, 2018
1 parent e686849 commit 0cd3d20
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions fluorine_renderer.html
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@

for (let pid = 0; pid < renderer.players(); pid++) {

let some_ships = previous_frame.entities[pid.toString()];
let some_ships = previous_frame.entities[pid];

if (some_ships === undefined) {
continue;
Expand All @@ -359,7 +359,7 @@

let sid = sids[n];

if (some_ships[sid.toString()] !== undefined) {
if (some_ships[sid] !== undefined) {
colour_map[sid] = colours[pid];
}
}
Expand Down Expand Up @@ -641,7 +641,7 @@
}

for (let pid = 0; pid < renderer.players(); pid++) {
let some_moves = frame.moves[pid.toString()];
let some_moves = frame.moves[pid];
if (some_moves === undefined) {
continue;
}
Expand All @@ -667,7 +667,7 @@

let colour = colours[pid];

let some_ships = frame.entities[pid.toString()];
let some_ships = frame.entities[pid];

if (some_ships === undefined) {
continue;
Expand Down Expand Up @@ -876,7 +876,7 @@

for (let pid = 0; pid < renderer.players(); pid++) {

let some_ships = renderer.current_frame().entities[pid.toString()];
let some_ships = renderer.current_frame().entities[pid];

if (some_ships === undefined) {
continue;
Expand Down Expand Up @@ -915,13 +915,13 @@

for (let pid = 0; pid < renderer.players(); pid++) {

let some_ships = renderer.current_frame().entities[pid.toString()];
let some_ships = renderer.current_frame().entities[pid];

if (some_ships === undefined) {
continue;
}

let hit = some_ships[sid.toString()];
let hit = some_ships[sid];

if (hit) {

Expand All @@ -947,7 +947,7 @@

for (let pid = 0; pid < renderer.players(); pid++) {

let some_moves = renderer.current_frame().moves[pid.toString()];
let some_moves = renderer.current_frame().moves[pid];

if (some_moves === undefined) {
continue;
Expand All @@ -972,7 +972,7 @@

let frame = renderer.current_frame();

let some_ships = frame.entities[pid.toString()];
let some_ships = frame.entities[pid];

if (some_ships === undefined) {
return 0;
Expand All @@ -998,7 +998,7 @@

let frame = renderer.current_frame();

let some_ships = frame.entities[pid.toString()];
let some_ships = frame.entities[pid];

if (some_ships === undefined) {
return 0;
Expand Down Expand Up @@ -1083,9 +1083,9 @@

for (let pid = 0; pid < renderer.players(); pid++) {

let deposited = renderer.previous_frame().deposited[pid.toString()];
let deposited = renderer.previous_frame().deposited[pid];
let initial = renderer.game.GAME_CONSTANTS.INITIAL_ENERGY;
let current = renderer.previous_frame().energy[pid.toString()];
let current = renderer.previous_frame().energy[pid];
let spent = deposited + initial - current;

let colour = colours[pid];
Expand Down

0 comments on commit 0cd3d20

Please sign in to comment.