feat: expand campaign and refine puzzle visuals and controls
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
// Store identities, not coordinates: re-check each move against the latest board.
|
||||
export class TapQueue {
|
||||
constructor(){this.ids=[];}
|
||||
add(id,activeId){if(id===activeId||this.ids.includes(id))return false;this.ids.push(id);return true;}
|
||||
take(tiles){while(this.ids.length){const id=this.ids.shift(),tile=tiles.find(t=>t.id===id);if(tile)return tile;}return null;}
|
||||
clear(){this.ids.length=0;}
|
||||
}
|
||||
Reference in New Issue
Block a user