Skip to content

Commit

Permalink
smaller dashes
Browse files Browse the repository at this point in the history
  • Loading branch information
fohristiwhirl committed Oct 4, 2018
1 parent 6d6c690 commit db01647
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions fluorine_renderer.html
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,9 @@
renderer.box_string = (x, y, highlighted) => {
let val = renderer.production_maps[renderer.turn][x][y];
if (highlighted) {
return `[${x}, ${y}] — ${val}`;
return `[${x}, ${y}] – ${val}`;
} else {
return `${x}, ${y} — ${val}`;
return `${x}, ${y} – ${val}`;
}
};

Expand All @@ -451,16 +451,16 @@
if (highlight_box) {

return `${renderer.box_string(ship_info.x, ship_info.y, true)}`
+ ` &mdash; <span style="color: ${colour};">Ship ${sid}${mark}</span>`
+ ` &mdash; <span style="color: ${colour};">${ship_info.energy}</span>`
+ ` &mdash; next is <span style="color: ${colour};">${renderer.ship_move(sid)}</span>`;
+ ` &ndash; <span style="color: ${colour};">Ship ${sid}${mark}</span>`
+ ` &ndash; <span style="color: ${colour};">${ship_info.energy}</span>`
+ ` &ndash; next is <span style="color: ${colour};">${renderer.ship_move(sid)}</span>`;

} else {

return `${renderer.box_string(ship_info.x, ship_info.y, false)}`
+ ` &mdash; <span style="color: ${colour};">[Ship ${sid}${mark}]</span>`
+ ` &mdash; <span style="color: ${colour};">${ship_info.energy}</span>`
+ ` &mdash; next is <span style="color: ${colour};">${renderer.ship_move(sid)}</span>`;
+ ` &ndash; <span style="color: ${colour};">[Ship ${sid}${mark}]</span>`
+ ` &ndash; <span style="color: ${colour};">${ship_info.energy}</span>`
+ ` &ndash; next is <span style="color: ${colour};">${renderer.ship_move(sid)}</span>`;
}
};

Expand All @@ -478,7 +478,7 @@
let collision = renderer.collision_at(x, y);

if (collision) {
return `${renderer.box_string(x, y, true)} &mdash; ${renderer.collision_string(collision, renderer.turn)}`;
return `${renderer.box_string(x, y, true)} &ndash; ${renderer.collision_string(collision, renderer.turn)}`;
} else {
let ship_info = renderer.ship_at(x, y);
if (ship_info) {
Expand All @@ -497,7 +497,7 @@
if (collision) {
let x = collision.location.x;
let y = collision.location.y;
return `${renderer.box_string(x, y)} &mdash; ${renderer.collision_string(collision, renderer.turn)}`;
return `${renderer.box_string(x, y)} &ndash; ${renderer.collision_string(collision, renderer.turn)}`;
}

return renderer.box_with_ship_string(sid, false);
Expand Down Expand Up @@ -942,7 +942,7 @@

renderer.ship_move = (sid) => {

let lookups = {"n": "up", "s": "down", "e": "right", "w": "left", "o": "&mdash;"};
let lookups = {"n": "up", "s": "down", "e": "right", "w": "left", "o": "&ndash;"};

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

Expand All @@ -962,7 +962,7 @@
}
}

return "&mdash;"; // No move present means no move.
return "&ndash;"; // No move present means no move.
};

renderer.ship_count = (pid) => {
Expand Down Expand Up @@ -1076,7 +1076,7 @@
lines.push(`<p><br></p>`);

lines.push(`<p>${path.basename(renderer.filename)}</p>`);
lines.push(`<p>${renderer.width} x ${renderer.height} &mdash; ${renderer.turn} / ${renderer.game_length() - 1}</p>`);
lines.push(`<p>${renderer.width} x ${renderer.height} &ndash; ${renderer.turn} / ${renderer.game_length() - 1}</p>`);

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

Expand All @@ -1088,7 +1088,7 @@
let colour = colours[pid];
lines.push(`<h2 style="color: ${colour}">${renderer.game.players[pid].name}</h2>`);
lines.push(`<ul>`);
lines.push(`<li>Ships: ${renderer.ship_count(pid)} &mdash; carrying ${renderer.transit_count(pid)}</li>`);
lines.push(`<li>Ships: ${renderer.ship_count(pid)} &ndash; carrying ${renderer.transit_count(pid)}</li>`);
lines.push(`<li>Deposits: ${deposited + initial}</li>`);
lines.push(`<li>Spent: ${spent > 0 ? "-" : ""}${spent}</li>`);
lines.push(`<li>Net: <span style="color: ${colour}">${current}</span></li>`);
Expand Down

0 comments on commit db01647

Please sign in to comment.