From b19186b59b21f41411a84f8beacabfd4bbf4acc4 Mon Sep 17 00:00:00 2001 From: Oktay Date: Tue, 6 Sep 2022 15:07:18 +0200 Subject: [PATCH] Fix #2 --- README.md | 2 +- src/state/machines/zhithead.machine.ts | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1d61f1c..b6c9fe9 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Of course to playtest the game you need to know the rules. Well, here they are: - 10: Burns the pile including itself - Player can play multiple cards of the same rank - After every turn Player must take from deck until **hand** size is **3** -- Player takes whole pile if no card could be played into their **hand** +- Player can pick up the pile at any moment - When a _hand_ is empty you move to the next one: **hand** -> **face-up** -> **face-down** - **face-down** cards are played _blindly_ and player must take the pile diff --git a/src/state/machines/zhithead.machine.ts b/src/state/machines/zhithead.machine.ts index 7ed8ddc..fbb3939 100644 --- a/src/state/machines/zhithead.machine.ts +++ b/src/state/machines/zhithead.machine.ts @@ -142,13 +142,7 @@ export const zhitheadMachine = zhitheadModel.createMachine( "takePile", "switchTurns", ], - cond: (context) => - context.currentTurn === "human" && - (!_canPlay( - context.pile.at(-1)!, - context.pile.slice(0, -1) - ) || - !canCurrentPlayerPlayCard(context)), + cond: (context) => context.currentTurn === "human", }, }, },