Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import * as cells from "level/cells.js";
import pc from "being/pc.js";
const GRASS_1 = new cells.Grass("\"");
const GRASS_2 = new cells.Grass("'");
const TREE = new cells.Tree();
const NOISE = new ROT.Noise.Simplex();
const memories = {};
function darken(color) {
if (!color) { return color; }
return ROT.Color.toRGB(ROT.Color.fromString(color).map(x => x>>1));
}
export default class Memory {
static forLevel(level) {
if (!(level.id in memories)) { memories[level.id] = new this(level); }
return memories[level.id];
}
import * as cells from "level/cells.js";
import pc from "being/pc.js";
const GRASS_1 = new cells.Grass("\"");
const GRASS_2 = new cells.Grass("'");
const TREE = new cells.Tree();
const NOISE = new ROT.Noise.Simplex();
const memories = {};
function darken(color) {
if (!color) { return color; }
return ROT.Color.toRGB(ROT.Color.fromString(color).map(x => x>>1));
}
export default class Memory {
static forLevel(level) {
if (!(level.id in memories)) { memories[level.id] = new this(level); }
return memories[level.id];