Coding simple SCRABBLE for two player without knowing each other tiles

Hi everyone!
I’ve been looking around for clues for my project, and haven’t found anything that helps me.
I want to code a tiny scrabble game for two players.

I’m now asking for coding so that no player can see the tiles of each other in his/her screen. I’m going to use FirebaseDB which i know how to use.

I’ve just thought of one different screen for each player, but then how to manage common events at sight there, like tiles in common board, scores…?

Any guide, tip, ‘light’, or maybe other way to focus the code, will be warmly appreciated!
Many thanks in advance!

You can use Firebase OnData Changed block to update results in real time from the database.

P.S: I don’t know about the graphics part. :slight_smile:

Thanks. I know how Firebas ondata changed is going, but…

My problem is how to set screens for each player so that anyone can see the tiles of each other.

It’s also like to code that in any card game as poker, or cluedo, and similars …

Only one sugestion.
On the smartphone record the player’s ID locally. In the routine of setting up / configuring the screen you will use this id to allow what this user will be able to see and access.

You must determine who is the next player. In order to release him to make the move and the others are blocked.

1 Like

Just an idea.

You can create a bucket dynamically and store those two players data in that bucket. After they both stopped playing the game, you can delete that bucket in the Firebase.

The bucket id will be shared between both the players as the ROOM ID(Like we do in the PUBG).


Suppose you and I are playing the game. I opened Scrabble app and created a room. After I created a room, a firebase project bucket will be created dynamically and give it a random name(I will recommend numbers of 6-7 digits). Now that id will be the room id for you to join my room.

That’s how you can make it.


Thanks for both before answers!
I forgot to say I am an absolute begginer.
I just want to code something simple only for my family/friends and me , nothing sophisticated :grin: :smile:

I’ll try Rogerio’s suggestion, thanks!

For Shivam’s one, I’d need to know about rooms and buckets, If any other little help or way to make , i’d thank you lots!!

Best regards!


With Firebase, that’s the best way to do. If I’ll get something easier I’ll let you know. :slight_smile:

Thanks Shivam
Yes i think so, as i told, I’m already using Firebase , and my main matter is to hide the tiles from each player to the other one
I’m trying the Rogerio’s suggestion little step to little step , hope to find the right way for me.
When i set Visible as false, then the others things in the arragement change their place and i get confused lot
I’ve thought about to set some canvas for each player tiles, but i need some time to find up if it’s useful
Of course, all kind of help or tip will be strongly appreciated!