Fixed count
This commit is contained in:
@@ -130,7 +130,7 @@
|
|||||||
statusEl.innerHTML = `<span style="color:${state.winner === myRole ? 'green' : 'red'}">SPIEL ENDE: ${state.winner.toUpperCase()} GEWINNT!</span>`;
|
statusEl.innerHTML = `<span style="color:${state.winner === myRole ? 'green' : 'red'}">SPIEL ENDE: ${state.winner.toUpperCase()} GEWINNT!</span>`;
|
||||||
} else {
|
} else {
|
||||||
const turnText = state.turn === myRole ? "🟢 Dein Zug" : "⏳ Gegner zieht...";
|
const turnText = state.turn === myRole ? "🟢 Dein Zug" : "⏳ Gegner zieht...";
|
||||||
statusEl.innerHTML = `${turnText}<br><small>Zug: ${state.moveCount} / 20</small>`;
|
statusEl.innerHTML = `${turnText}<br><small>Zug: ${state.moveCount} / 40</small>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw Lines
|
// Draw Lines
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ function checkWinConditions(game) {
|
|||||||
// 1. Wolf reaches node 0
|
// 1. Wolf reaches node 0
|
||||||
if (game.wolf === 0) return "wolf";
|
if (game.wolf === 0) return "wolf";
|
||||||
|
|
||||||
// 2. Turn limit (20 moves)
|
// 2. Turn limit (40 moves)
|
||||||
if (game.moveCount >= 20) return "wolf";
|
if (game.moveCount >= 40) return "wolf";
|
||||||
|
|
||||||
// Mobility Check helpers
|
// Mobility Check helpers
|
||||||
const canWolfMove = board_wolf[game.wolf].some(to =>
|
const canWolfMove = board_wolf[game.wolf].some(to =>
|
||||||
|
|||||||
Reference in New Issue
Block a user