This is an online interactive online game build using trpc with fastify, react-native and nextjs.
This is the folder structure of the blackjack mono repo.
📁 packages
|---📁 server
|---📁 web
|--- 📁 mobile
📁 prisma
📁 assets
|---📁 cards
|---📁 back
|---📁 jacks
|---📁 png
|---📁 svg
The following are the back covers that players can select before starting the game:
These instructions shows how to test this game locally. You can follow the README files in respective packages:
After you have installed the dependencies of each package you can start the game by navigating to the root directory which is the blackjack and run the following command:
yarn startThis will start all teh packages in parallel. And you will be able to test them.
In this section I will show the screenshots of the UI of the web and mobile version of the game.
- auth screens
- app/game screens
- auth screens
- app/game screens
blackjack is an online game that allows users to play remotely. So here is how you can use the game.
- you need an account with
nicknameandpassword - you can create a single instance of
engine/environmentthat you can play with your friend. - the creator of the
engineis the engine admin and he has the authority to:- remove
gamers startand stop thegame
- remove
- other players can play as regular users within the game
engine. - real time updates are given to those
gamersthat are in a certain game environment orengine - regular users and even the admin can leave the engine anytime they want to.
- when the game is completed the results are shown to every connected
gamerwith positionsnicknamesandpoints - During starting of the game the admin can select the card they want to use as a
blackjackand also thebackcoverforanonymouscards. - gamers within the engine can also chat using the
chatplatform.
Everyone has a chance to win the game. Here is how the game is played:
-
Since it is a multiple player game, every
gammerhas a number and the playingturnsmoves inascendingorder of numbers meaning: _ player number 1 plays first. _ the last player will play lastNote that the maximum number of players allowed to be in a game
engineorenvironmentare5players andminimumfor the game to be able to start are2players. -
You match cards that have same name for example a
Qand aQ, a2and a2, it doesn't mater whichQis it it can be ofhearts,clubs,spadesordiamonds. Here is an example of matching cards.
So to match these cards you just need to click the first card and click the next one, then your cards will be updated.
-
In the event that your matching cards are finished you click the
DONEbutton so that the next player in ascending will play next. -
After all the matching cards has been finished on all the gamers, now gamers can start picking up the
cardsfor thenextascending player. When you see that you picked thematchingcard you can match and clickDONEbutton so that the next player will also pick from whoever he should pick from.
Note that if you pick a card, as an important rule if the card match play it and click the
DONEbutton if not just click theDONEbutton so that next players get their chances.
- The process will be looped till all the cards are finished. The player that will be left with
JACK_OF_CLUBSorJACK_OF_SPADESwill loose the game, here are the jacks that we are talking about.
I give credits to this website where i got the .svg and .png cards image faces from.
In this project I'm using the MIT license which reads as follows:
MIT License
Copyright (c) 2023 crispengari
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.




























