- Timestamp:
- 07/03/22 22:59:15 (2 years ago)
- Branches:
- main
- Children:
- 3a783f2
- Parents:
- ace7865
- Location:
- redux/reducers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
redux/reducers/playerSlice.js
race7865 rb13f93b 21 21 }, 22 22 pokerGame: { 23 status: '_1_waiting_for_players', 24 turnIdx: 0, 25 playerCards: ['c4', 'c2'], 26 cardsOnTable: ['c3', 'c1', 'c5'], 27 players: [ 28 { 29 status: 'disconnected', 30 displayName: 'Pero', 31 betAmount: 33, 32 }, 33 { 34 status: 'playing', 35 displayName: 'Johnny', 36 betAmount: 29, 37 }, 38 { 39 status: 'onTurn', 40 displayName: 'Waterlo', 41 betAmount: 199, 42 }, 43 ] 44 } 45 // pokerGame: { 46 // status: '', 47 // turnIdx: 0, 48 // players: [], 49 // } 23 tables: [], 24 table: { 25 id: '', 26 name: '', 27 status: '', 28 creator: '', 29 started: false, 30 round: 0, 31 turnIdx: 0, 32 lastBet: 0, 33 turnsSinceLastBet: 0, 34 players: [{ 35 id: '', 36 table: '', 37 status: '', 38 displayName: '', 39 cards: [], 40 betAmount: 0, 41 isSatDown: false, 42 iSCoordinator: false, 43 }], 44 cards: [], 45 }, 46 player: { 47 status: '', 48 cards: [], 49 table: '', 50 isSatDown: false, 51 isCoordinator: false, 52 }, 53 }, 50 54 } 51 55 … … 63 67 state.rouletteGame = action.payload; 64 68 }, 69 setPokerGame: (state, action) => { 70 state.pokerGame = action.payload; 71 }, 65 72 } 66 73 }) 67 74 68 export const { setPlayer, setBlackjackGame, setRouletteGame } = playerSlice.actions75 export const { setPlayer, setBlackjackGame, setRouletteGame, setPokerGame } = playerSlice.actions 69 76 70 77 export default playerSlice.reducer -
redux/reducers/styleSlice.js
race7865 rb13f93b 107 107 raise: { 108 108 chosenCredits: 0, 109 } 109 }, 110 tableName: '', 110 111 }, 111 112 callAmount: 0, 112 113 texts: { 113 text1: ' A new card has been dealt!',114 text2: ' Player Pero\'s Turn (00:13)',115 text3: ' Pero has disconnected. They have 30 seconds to reconnect.'114 text1: '', 115 text2: '', 116 text3: '' 116 117 } 117 118 } … … 130 131 setRoulette: (state, action) => { 131 132 state.roulette = action.payload; 133 }, 134 setPoker: (state, action) => { 135 state.poker = action.payload; 132 136 } 133 137 } 134 138 }) 135 139 136 export const { setStyle, setBlackjack, setRoulette } = styleSlice.actions140 export const { setStyle, setBlackjack, setRoulette, setPoker } = styleSlice.actions 137 141 138 142 export default styleSlice.reducer
Note:
See TracChangeset
for help on using the changeset viewer.