Need help with data base and list

hi all i need help with this so i’m making a bingo game and i need it to be when the user playing get a full house (tick off all of the boxes ) it will get all of the numbers and add then into a database as a list but only if the tick off all the boxes if they haven’t a message will display


so here is what the game looks like

when they click on a box the star will appear (marking that it has been ticked)

when they have ticked all the boxes they will click the bingo button

when they click the bingo button if they have ticked all the boxes the aboth will happen if not the below will happen

so i need help as i don’t know how to make it tell that the user has ticked all of the boxes and i also need help as for some reason when it tries to create a list it only adds one number and also in the wrong list i need it to be in the bingo list not the BW list

add condition on button - search of bingo cards numbers unchecked count is 0 if yes then clickable (ie all numbers checked on the card)

if bingo is also acheived with row/column then you can also achieve that with some extra fields on the bingo number ie row and column, row 1, column abcd

if search of bingo numbers filtered to checked grouped by row count > 4 etc

there is no way for the data base to see what is check or not checked

depends where/how you store the “checked numbers”

could store numbers as a list on the bingo card (data)
could store numbers as a separate data type and then list those number datas on the bingo card data (gives you ability to have bingo based on row/column combos)
store the selected in a state on the page either as numbers or number datas

states would be best since the game is likely short lived and fast paced (states are instant whereas database writes are a bit slower).

suggested data setup
simple version
bingo card - status (used/not used), created date, owned by user, numbers list, selected numbers list

more advanced scoring
bingo card - as above but numbers are now a separate data type
bingo number - card, number, row, column, selected y/n

having a bingo number data type allows you to explicitly assign a column and row to each number which can be used later to figure out if all the numbers in 1 column are checked or not.

on page logic
use opens page
selects bingo card (could also create new here, random gen numbers, assign to user etc)
user clicks on numbers (these are in a repeating group)
each number is added/removed from a state on the page or written back to database (state likely better here)
use state list of numbers vs bingo list of numbers to evaluate conditions for won/lost/button clickable etc

simple simple version
don’t write the selected numbers back to database and instead just recycle the bingo card
hold the selected numbers as a state on the page still
don’t own the bingo card by a user, instead just count won/lost on user data

if bingo cards are owned by the user then to get the users win rate you’d search bingo cards owned by user :sum

otherwise a simple +/- on each win would be fine for simple logic

hi thank you for that i have run in to my last problem
so i got it that everytime they click the button it will add a +1 to the score when they get 16 they system knows its a full house but for some reason is not adding + 1 to the DB


Screenshot 2025-01-23 08.12.16
if you can see its only changing the number to 1 not adding +1