Skip to content

ShallWeMove/SuiMove-Blackjack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🂡 SuiMove-Blackjack 🂡

ShallWeMove is Decentralized Casino of SUI ecosystem.
Enjoy Blackjack at ShallWeMove🔥!!

Get Started
Architecture
Objects
Fucntions
Dealer
Player

Get Started

Local Development

make run

SSL Certificate files are required to run the server. localhost.crt and localhost.key will be automatically generated in the nginx directory.

Connect Your Wallet

play_1

Bet Your SUI

play_2

Play Blackjack!

play_3

Architecture

Main logic of ShallWeMove Blackjack is developed by SUI Move.
All players can observe the smart contracts of ShallWeMove and enjoy transparent blackjack game at Decentralized Casino.

Screenshot 2023-07-04 at 22 01 06

Objects

To ensure transparency and fairness of blackjack game, ShallWeMove utilized the Object of SUI.
There are 5 types of objects for ShallWeMove Blackjack game. They enables decentralized casino which operates blackjack game totally onchain.

  • GameTable
  • Hand
  • CardDeck
  • Card
  • MoneyBox

GameTable

GameTable is essential object to play blackjack
it wrap objects like below
is_playing = 0 : not ready / 2 : game ready / 10 : game is playing

Hand

player and delear with Hand can hold some cards

CardDeck

a set of cards, total_cards_number refers to the quantity of cards in a deck.

Card

When card is open, card number is number.
In other hand, when card is flipped over, card number is some cryptogram

MoneyBox

place to store betting money

Functions

new_game()

dealer action from BE 
This function will be executed in the Backend 
dealer or anyone who wanna be a dealer can create new game 

create_game_table()

 dealer action from BE 
 can create game table for blackjack game with game info object 
 create a card deck, a dealer hand and a money box 
 the objects created will be transfered to game table 

ready_game()

 player action from FE 
 transfer player hand to game table and bet some money 

start_game()

 dealer action from BE 
 transfer cards to player and dealer hand to play game 

go_card()

 dealer action from BE 
 tansfer a card to player hand 

stop_card()

 dealer action from BE 
 finish game 

Dealer (Account, BE)

Objects

GameTable

  • GameTable
    • PlayerHand
    • DealerHand
    • CardDeck
      • Cards : [Card...]
    • MoneyBox
      • Stake : [Coin...]

DealerHand

  • DelaerHand
    • Cards : [Card...]

CardDeck

  • CardDeck
    • Cards :[Card...]

MoneyBox

  • MoneyBox
    • Stake : [Coin...]

Functions

new_game()

create_game_table()

start_game()

go_card()

stop_card()

Player (Account, Client)

Objects

PlayerHand

  • PlayerHand
    • [Card...]

Functions

ready_game()

Architecture

FE

BE

MOVE

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 7