Changeset 9bd09b0 for redux


Ignore:
Timestamp:
06/23/22 00:08:35 (2 years ago)
Author:
anastasovv <simon@…>
Branches:
main
Children:
ace7865
Parents:
285c3cc
Message:

Roulette place a bet functionality

Location:
redux/reducers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • redux/reducers/playerSlice.js

    r285c3cc r9bd09b0  
    99        credits: 0,
    1010    },
    11     game: {
     11    blackjackGame: {
     12        status: '',
    1213        playerCards: [],
    1314        dealerCards: [],
     15        sideBetName: '',
     16    },
     17    rouletteGame: {
    1418        status: '',
    15         sideBetName: '',
     19        timeToStart: 0,
     20        players: [],
    1621    }
    1722}
     
    2429            state.player = action.payload;
    2530        },
    26         setGame: (state, action) => {
    27             state.game = action.payload;
     31        setBlackjackGame: (state, action) => {
     32            state.blackjackGame = action.payload;
     33        },
     34        setRouletteGame: (state, action) => {
     35            state.rouletteGame = action.payload;
    2836        },
    2937    }
    3038})
    3139
    32 export const { setPlayer, setGame } = playerSlice.actions
     40export const { setPlayer, setBlackjackGame, setRouletteGame } = playerSlice.actions
    3341
    3442export default playerSlice.reducer
  • redux/reducers/styleSlice.js

    r285c3cc r9bd09b0  
    8080            sideBetsPaysText: '',
    8181        }
     82    },
     83    // roulette
     84    roulette: {
     85        displays: {
     86            betModal: false,
     87        },
     88        inputControls: {
     89            bet: {
     90                chosenCredits: 0,
     91            },
     92        },
     93        whichBets: [],
     94        coinPlaced: {
     95            x: 0,
     96            y: 0,
     97        }
    8298    }
    8399}
     
    92108        setBlackjack: (state, action) => {
    93109            state.blackjack = action.payload;
     110        },
     111        setRoulette: (state, action) => {
     112            state.roulette = action.payload;
    94113        }
    95114    }
    96115})
    97116
    98 export const { setStyle, setBlackjack } = styleSlice.actions
     117export const { setStyle, setBlackjack, setRoulette } = styleSlice.actions
    99118
    100119export default styleSlice.reducer
Note: See TracChangeset for help on using the changeset viewer.