Two teams try and fill in any horizontal, vertical, or diagonal line on a bingo board by playing maps on osu! osu.bingo
osu
at microservice 30 lines 742 B view raw
1<script> 2 import { Play } from 'lucide-svelte'; 3 import { game } from '$lib/stores'; 4 5 let sent = false; 6 const send_board = async () => { 7 const body = new FormData(); 8 await fetch('?/send_board', { 9 method: 'POST', 10 body 11 }); 12 sent = true; 13 }; 14</script> 15 16<div class="flex size-full h-16 items-center rounded bg-green-600/50 p-2"> 17 <div class="mr-1 flex size-5 h-full items-center opacity-50"> 18 <Play /> 19 </div> 20 <div>The game started!</div> 21 {#if $game && $game.state == 1} 22 <button 23 class="absolute right-2 rounded bg-yellow-600 p-1 font-rounded font-black text-zinc-200 disabled:text-zinc-900 disabled:brightness-50" 24 disabled={sent} 25 on:click={send_board} 26 > 27 {sent ? 'Sent!' : 'Send Board'} 28 </button> 29 {/if} 30</div>