From 761a3172bf4c15aed3836e4d1cd6f815b651b0e0 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Sat, 29 Aug 2026 04:06:51 -0400 Subject: Fix --- 2026/games_submissions/liquidcake1/queue.mjs | 30 ---------------------------- 1 file changed, 30 deletions(-) delete mode 100644 2026/games_submissions/liquidcake1/queue.mjs (limited to '2026/games_submissions/liquidcake1/queue.mjs') 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]; - } -} -- cgit v1.3.1