Select Git revision
-
Brady James Garvin authoredBrady James Garvin authored
items.js 312 B
export class Item {
constructor(weight, value) {
console.assert(weight > 0, `Tried to create an item with a nonpositive weight ${weight}.`);
console.assert(Number.isInteger(weight), `Tried to create an item with a noninteger weight ${weight}.`);
this.weight = weight;
this.value = value;
}
}