Player movement #38
@ -14,6 +14,8 @@ class Game {
|
|||||||
let move_to_next_round = false;
|
let move_to_next_round = false;
|
||||||
// move on to next player; skip dead players
|
// move on to next player; skip dead players
|
||||||
do {
|
do {
|
||||||
|
if(this.players.length === 0) break;
|
||||||
|
|
||||||
this.currentPlayerIndex++;
|
this.currentPlayerIndex++;
|
||||||
if (this.currentPlayerIndex >= this.players.length) {
|
if (this.currentPlayerIndex >= this.players.length) {
|
||||||
this.currentPlayerIndex = 0;
|
this.currentPlayerIndex = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user