trucoshi 0.2.15 → 0.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,10 +23,15 @@ function Hand(match, deck, idx) {
23
23
  hand.pushRound(round);
24
24
  let previousRound = hand.rounds[currentRoundIdx - 1];
25
25
  // Put previous round winner as forehand
26
- if (previousRound && previousRound.winner && !previousRound.tie) {
27
- const newTurn = match.table.getPlayerPosition(previousRound.winner.id);
28
- if (newTurn !== -1) {
29
- hand.setTurn(newTurn);
26
+ if (previousRound && previousRound.winner) {
27
+ if (!previousRound.tie) {
28
+ const newTurn = match.table.getPlayerPosition(previousRound.winner.id);
29
+ if (newTurn !== -1) {
30
+ hand.setTurn(newTurn);
31
+ }
32
+ }
33
+ else {
34
+ hand.setTurn(match.table.forehandIdx);
30
35
  }
31
36
  }
32
37
  while (round.turn < match.table.players.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trucoshi",
3
- "version": "0.2.15",
3
+ "version": "0.2.17",
4
4
  "main": "dist/index.js",
5
5
  "license": "GPL-3.0",
6
6
  "scripts": {