Flip over red cards inatead of black

This commit is contained in:
Anthony Wang 2022-05-03 10:57:27 -05:00
parent abd3e2edc1
commit a13b6f46a0
Signed by: a
GPG Key ID: BC96B00AEC5F2D76
2 changed files with 5 additions and 5 deletions

View File

@ -195,8 +195,8 @@ export default class Game {
delete p.disconnectListener;
(() => {
if (this.players[selectedPlayer].stack.length > 0) {
if (this.players[selectedPlayer].stack[0].suit === Suit.Diamonds ||
this.players[selectedPlayer].stack[0].suit === Suit.Hearts) this.phase = 3; // Red card
if (this.players[selectedPlayer].stack[0].suit === Suit.Spades ||
this.players[selectedPlayer].stack[0].suit === Suit.Clubs) this.phase = 3; // Red card
this.players[selectedPlayer].flipped.push(this.players[selectedPlayer].stack[0]);
this.players[selectedPlayer].stack.splice(0, 1);
return;

View File

@ -24,9 +24,9 @@ const rules = `There are only 5 simple rules!
2. At the beginning of each round, you must rearrange the order of your cards and place them face down in a stack.
3. During the round, players go around in a circle, claiming increasingly greater numbers. If it is your turn to claim a number, you must either claim a larger number than the previously claimed number or call BS. If you call BS, the previous player must flip over their claimed number of black (clubs or spades) cards from the tops of everyone's stacks.
3. During the round, players go around in a circle, claiming increasingly greater numbers. If it is your turn to claim a number, you must either claim a larger number than the previously claimed number or call BS. If you call BS, the previous player must flip over their claimed number of red (heart or diamond) cards from the tops of everyone's stacks.
4. When you click flip, it flips over the top card from that person's stack. If the previous player flips over a red card or cannot flip over their claimed number of black cards, they must choose a card from their stack to give up. Otherwise, the person who called BS must choose one of their cards to give up.
4. When you click flip, it flips over the top card from that person's stack. If the previous player flips over a black card or cannot flip over their claimed number of red cards, they must choose a card from their stack to give up. Otherwise, the person who called BS must choose one of their cards to give up.
5. If you give up all your cards, you lose! Last player remaining wins!
@ -264,7 +264,7 @@ export default function Game() {
</li>
))}
</ul>
{`${gameState.playerTurn} has called BS! ${gameState.lastPlayedPlayer} must flip over ${gameState.lastPlayed} black cards!`}
{`${gameState.playerTurn} has called BS! ${gameState.lastPlayedPlayer} must flip over ${gameState.lastPlayed} red cards!`}
<div>
<p>Stacks:</p>
{gameState.players.map((player, i) => (