Coder Social home page Coder Social logo

parkcharles / shall-we-move Goto Github PK

View Code? Open in Web Editor NEW

This project forked from casuino/shall-we-move

0.0 0.0 0.0 7.89 MB

Blackjack Game on SUI ecosystem (2023 SUI X KUCOIN LABS SUMMER HACKATHON)

Shell 0.10% JavaScript 11.60% TypeScript 9.41% CSS 0.24% HTML 0.44% Move 78.21%

shall-we-move's Introduction

🂡 SuiMove-Blackjack 🂡

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

Get Started
Architecture
Objects
Fucntions
Dealer
Player

Get Started

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()

shall-we-move's People

Contributors

styu12 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.