diff options
| author | LLLL Colonq <llll@colonq> | 2026-08-18 00:08:28 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2026-08-18 00:08:28 -0400 |
| commit | 32a62cfcb925225359a5c90761b795f2f737ebd2 (patch) | |
| tree | 95c2261964803b19f2d39cb35d8d514ed6e5a6f4 /2026/games_submissions/liquidcake1/queue.mjs | |
| parent | de99c5f7636a952025ea13de02bafd25bcb6bdec (diff) | |
Re-populate games
Diffstat (limited to '2026/games_submissions/liquidcake1/queue.mjs')
| -rw-r--r-- | 2026/games_submissions/liquidcake1/queue.mjs | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/2026/games_submissions/liquidcake1/queue.mjs b/2026/games_submissions/liquidcake1/queue.mjs deleted file mode 100644 index e6c3efe..0000000 --- a/2026/games_submissions/liquidcake1/queue.mjs +++ /dev/null @@ -1,30 +0,0 @@ -export class Queue { - /* Structure is a (hopefully short) list of (longer) lists. - * Queue to the last list. - * Hold index into first list. - */ - length = 0; - index = -1; - content = [[]]; - max_len = 100; - push(x) { - let content = this.content; - if (content[content.length - 1].length > this.max_len) { - content.push([]); - } - content[content.length - 1].push(x); - this.length += 1; - } - pop() { - this.index += 1; - if (this.index >= this.content[0].length) { - if (this.content.length == 1) { - throw("empty"); - } - this.content.shift(); - this.index = 0; - } - this.length -= 1; - return this.content[0][this.index]; - } -} |
