- if (winner) {
- status = "Winner: " + winner;
- } else {
- status = "Next player: " + (Team.properties[state.next_to_play].name);
+ if (winner)
+ {
+ status = winner + " wins!";
+ if (state.player_info.team != "")
+ {
+ if (my_team === winner)
+ status += " Congratulations!";
+ else
+ status += " Better luck next time.";
+ }
+ board_active = false;
+ }
+ else if (first_move)
+ {
+ if (state.other_players.length == 0) {
+ status = "You can move or wait for another player to join.";
+ } else {
+ let qualifier;
+ if (state.other_players.length == 1) {
+ qualifier = "Either";
+ } else {
+ qualifier = "Any";
+ }
+ status = `${qualifier} player can make the first move.`;
+ }
+ board_active = true;
+ }
+ else if (my_team === "")
+ {
+ status = "You're just watching the game.";
+ board_active = false;
+ }
+ else if (my_team === Team.properties[state.next_to_play].name)
+ {
+ status = "Your turn. Make a move.";
+ board_active = true;
+ }
+ else
+ {
+ status = "Waiting for another player to ";
+ if (state.other_players.length == 0) {
+ status += "join.";
+ } else {
+ status += "move.";
+ }
+ board_active = false;