diff --git a/queuebServer/compose.yml b/queuebServer/compose.yml index bbb4e36..dd14667 100644 --- a/queuebServer/compose.yml +++ b/queuebServer/compose.yml @@ -15,18 +15,18 @@ services: # timeout: 10s # retries: 5 - # queueb: - # image: maxwellmichael/paradisbend:QB-Latest - # container_name: queueb - # restart: always - # ports: - # - "3000:3000" - # networks: - # - scylla-network - # environment: - # - SCYLLA_HOST=scylla - # depends_on: - # - scylla + queueb: + image: maxwellmichael/paradisbend:QB-Latest + container_name: queueb + restart: always + ports: + - "3014:3014" + networks: + - scylla-network + environment: + - SCYLLA_HOST=scylla + depends_on: + - scylla # scylla: # condition: service_healthy diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 022948e..f9281c8 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -16,6 +16,11 @@ let locked: boolean = false; + let shareBoard: boolean = false; + let sbi: number = 0; + let shareTarget: string = 'now'; + //let shareBlock: any[] = []; + let score: number = 0; let gameEnding: boolean = false; let gameOver: boolean = false; @@ -138,6 +143,7 @@ } let makeCube = (x: number) => { + //console.log(x); let c = colors[x % 100]; let a = 1 - x / 1400; let val = "background-color: rgba(255, 255, 255, .9)"; @@ -146,6 +152,18 @@ return val; }; + let onShare = (i: number, x: string) => { + if(sbi == i && shareTarget == x && shareBoard) { + shareBoard = false; + }else{ + sbi = i; + shareTarget = x; + shareBoard = true; + //console.log(sbi, shareTarget); + //console.log(scoreboard[shareTarget][sbi].cube); + } + } + let onEnter = (pI: string) => { username = pI; localStorage.setItem("username", username); @@ -256,6 +274,7 @@ current = 0; gameOver = false; score = 0; + day = 0; let gameState = { @@ -299,10 +318,12 @@

- Welcome! QueueB is a daily spacial puzzle game. Each day you - will recieve a unique queue of blocks and you must decide - where to place them to maximize your score. Future Updates - will add a scoreboard, additional unique blocks, and more! + Welcome! QueueB is a daily spacial puzzle game. Each day everyone + recieves the daily queue of blocks and you must decide + where to place them to maximize your score! Future updates will + include an all time top scores chart and a 1 vs 1 challenge mode where + you can take turns with a friend competing for the most points on a shared + board!

@@ -429,7 +457,7 @@ class="control" disabled={gameOver} on:click={() => (gameEnding = !gameEnding)} - >Queueb out: {current}{gameEnding ? 'Keep Playing':'Review Board'}: {current} -
- -
@@ -451,8 +476,17 @@
Count
Score
- {#each scoreboard.now as sc} -
+ {#each scoreboard.now as sc, i} +
onShare(i,'now')} + on:keydown={(e) => { + if (e.key === 'Enter' || e.key === ' ') { + onShare(i,'now'); + } + }}>
{sc.username}
{sc.count}
{sc.score}
@@ -480,6 +514,31 @@
+ {#if gameOver} +
{ if (shareBoard) onShare(sbi, shareTarget); }} + on:keydown={(e) => { + if ((e.key === 'Enter' || e.key === ' ') && shareBoard) { + onShare(sbi, shareTarget); + } + }}> +

{shareBoard ? 'Click Here to Hide Board Below!' : 'Click Someones Score To View Their Board!'}

+
+ {/if} + + {#if gameOver && shareBoard && scoreboard[shareTarget].length > 0} +

{`${scoreboard[shareTarget][sbi].username}'s #${sbi+1} Board ${shareTarget == 'now' ? 'Today' : 'Yesterday'}: ${scoreboard[shareTarget][sbi].count} Blocks`}

+
+ {#each JSON.parse(scoreboard[shareTarget][sbi].cube) as c, index} + {#each c as x, i} +
+ {/each} + {/each} +
+ {/if} +

Hall Of Fame

@@ -499,6 +558,12 @@

**WIP - Hall of Fame Updates Daily**

+
+
+ +
+
+