diff --git a/Client/origin-client/autoloads/Game.gd b/Client/origin-client/autoloads/Game.gd index 65157c7..4bd5967 100644 --- a/Client/origin-client/autoloads/Game.gd +++ b/Client/origin-client/autoloads/Game.gd @@ -584,7 +584,8 @@ func _on_server_push(type: String, payload: Variant) -> void: var wc : String = str(d.get("winCondition", "")) var wd : int = int(d.get("winnerRankDelta", 0)) var ld : int = int(d.get("loserRankDelta", 0)) - var outcomes : Array = d.get("playerOutcomes", []) as Array + var _raw_outcomes = d.get("playerOutcomes") + var outcomes : Array = _raw_outcomes as Array if _raw_outcomes is Array else [] session_id = "" # Clear so _on_auth_reconnect doesn't resend game.ready for an ended game state = {} # Clear stale state so a new GameScreen calls send_ready() on the next match game_over.emit(winner, wc, wd, ld, outcomes) diff --git a/Server/src/SOR.Game/Grid/BoardShapeGenerator.cs b/Server/src/SOR.Game/Grid/BoardShapeGenerator.cs index bf44ed5..9cd0103 100644 --- a/Server/src/SOR.Game/Grid/BoardShapeGenerator.cs +++ b/Server/src/SOR.Game/Grid/BoardShapeGenerator.cs @@ -43,14 +43,24 @@ public static class BoardShapeGenerator var zones = new Dictionary>(); - // Seat 0 = bottom 2 rows - zones[0] = CoordsInRows(0, 1, w); - if (playerCount >= 2) - zones[1] = CoordsInRows(h - 2, h - 1, w); - if (playerCount >= 3) - zones[2] = CoordsInCols(0, 1, h); - if (playerCount >= 4) - zones[3] = CoordsInCols(w - 2, w - 1, h); + // 2-player: one placement row each (preserves original 1v1 behavior). + // 3-4 player: two rows/cols per seat to give more placement room. + if (playerCount <= 2) + { + zones[0] = CoordsInRows(0, 0, w); + if (playerCount >= 2) + zones[1] = CoordsInRows(h - 1, h - 1, w); + } + else + { + zones[0] = CoordsInRows(0, 1, w); + if (playerCount >= 2) + zones[1] = CoordsInRows(h - 2, h - 1, w); + if (playerCount >= 3) + zones[2] = CoordsInCols(0, 1, h); + if (playerCount >= 4) + zones[3] = CoordsInCols(w - 2, w - 1, h); + } // Return a new Board with the zones attached (Board is a reference type with mutable Tiles // so we create a wrapper that shares the same Tiles dictionary).