Skip to content

Commit

Permalink
remove ancient redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
ramsagit committed Apr 19, 2024
1 parent af99ae7 commit 67c1319
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/components/ControlPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ export const ControlPanel: React.FC<IControlPanelProps> = (props) => {
const npcFlag = player.isNPC;
const isBtnDisabled = gameStatus > 2 || currentPlayerKey !== playerKey;

/* selectedFlag is true when the player has selected cards in his hand */
/* Flag used by put / draw menu items */
// let selectedCards = selectedFlag ? DeckStore.getSelected(playerKey) : [];
/* when gameStatusFlag is TRUE, most members of blackJackItems are disabled */

const _hit = () => {
toggleSetting({ key: 'isMessageBarVisible', value: true });
gameDispatch({ type: GameAction.Draw, playerKey, numberOfCards: 1, deckSide: 'top' });
Expand Down Expand Up @@ -106,9 +101,9 @@ export const ControlPanel: React.FC<IControlPanelProps> = (props) => {
name: "Deal",
ariaLabel: "Deal",
iconProps: { iconName: "Refresh" },
disabled: gameStatus > 0,
disabled: isBtnDisabled,
onClick: () => {
gameDispatch({ type: GameAction.NewRound });
gameDispatch({ type: GameAction.Deal });
toggleSetting({ key: 'isMessageBarVisible', value: true });
gameDispatch({
type: GameAction.ShowMessageBar,
Expand Down

0 comments on commit 67c1319

Please sign in to comment.