aboutsummaryrefslogtreecommitdiffstats
path: root/frontend
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2023-11-04 23:20:48 +0000
committerLeonardo Bishop <me@leonardobishop.com>2023-11-04 23:20:48 +0000
commit93c2048717b1d25a7ecf8047118e8ad2df669a4a (patch)
tree0c63b307b2c50c26e9b0ac20b7941ab67d215c10 /frontend
parent0b344940b98577f7396b80621eb07d472529580b (diff)
dsjkfghskdljf
Diffstat (limited to 'frontend')
-rw-r--r--frontend/src/components/TetrisBoard.vue2
-rw-r--r--frontend/src/views/JoinView.vue15
2 files changed, 15 insertions, 2 deletions
diff --git a/frontend/src/components/TetrisBoard.vue b/frontend/src/components/TetrisBoard.vue
index d7bd2d2..0185e53 100644
--- a/frontend/src/components/TetrisBoard.vue
+++ b/frontend/src/components/TetrisBoard.vue
@@ -113,7 +113,7 @@ const tick = () => {
break;
}
- if (!props.networked && gameSpeed > 150 && elapsedBlocks % 3 === 0) {
+ if (gameSpeed > 150 && elapsedBlocks % 3 === 0) {
gameSpeed = Math.max(150, gameSpeed - (gameSpeed > 300 ? 75 : 10));
rescheduleTickTimer();
}
diff --git a/frontend/src/views/JoinView.vue b/frontend/src/views/JoinView.vue
index abfbd1a..c9344db 100644
--- a/frontend/src/views/JoinView.vue
+++ b/frontend/src/views/JoinView.vue
@@ -51,10 +51,23 @@ function sendRight() {
<h1 v-if="joiningGame">Joining game "{{ sessionId }}"...</h1>
<h1 v-if="connected">Connected to "{{ sessionId }}"</h1>
<h1 v-if="gameState === 'waiting'">Waiting for host to start the game...</h1>
- <div v-if="gameState === 'playing'">
+ <div class='controls' v-if="gameState === 'playing'">
<button @click="sendLeft">Left</button>
<button @click="sendRotate">Rotate</button>
<button @click="sendRight">Right</button>
</div>
</main>
</template>
+
+<style scoped>
+ .controls {
+ display: flex;
+ flex-direction: row;
+ height: 100vh;
+ gap: 0.5rem;
+ }
+
+ .controls button {
+ flex-grow: 1;
+ }
+</style>