diff --git a/client/icons/icon.ico b/client/icons/icon.ico index 0b9ac2eb..44779715 100644 Binary files a/client/icons/icon.ico and b/client/icons/icon.ico differ diff --git a/client/src/components/sidebar/queue/queue-game.tsx b/client/src/components/sidebar/queue/queue-game.tsx index ee48210a..9c83d7e9 100644 --- a/client/src/components/sidebar/queue/queue-game.tsx +++ b/client/src/components/sidebar/queue/queue-game.tsx @@ -32,6 +32,8 @@ export const QueuedGame: React.FC = (props) => { return 'by resignation ' case schema.WinType.MAJORITY_PAINTED: return 'by having paint majority ' + case schema.WinType.ALL_UNITS_DESTROYED: + return 'by destroying all enemy units ' case schema.WinType.AREA_PAINTED: return 'by painting more territory ' case schema.WinType.MORE_TOWERS: diff --git a/client/src/components/sidebar/runner/scaffold.ts b/client/src/components/sidebar/runner/scaffold.ts index 51079345..ee21f8cc 100644 --- a/client/src/components/sidebar/runner/scaffold.ts +++ b/client/src/components/sidebar/runner/scaffold.ts @@ -376,7 +376,7 @@ async function dispatchMatch( break } case SupportedLanguage.Python: { - options = [`run.py`, `run`, `--p1=${teamA}`, `--p2=${teamB}`, `--map=${[...selectedMaps][0]}`] + options = [`run.py`, `run`, `--p1=${teamA}`, `--p2=${teamB}`, `--maps=${[...selectedMaps].join(',')}`] break } } diff --git a/client/src/components/sidebar/update-warning.tsx b/client/src/components/sidebar/update-warning.tsx index 6b154b4b..b3ea7dad 100644 --- a/client/src/components/sidebar/update-warning.tsx +++ b/client/src/components/sidebar/update-warning.tsx @@ -33,8 +33,8 @@ export const UpdateWarning = () => {

NEW VERSION AVAILABLE!
- download with gradle update followed by gradle build, and then restart the - client: v{update.latest} + download with (gradle update followed by gradle build) for java and ( + python run.py update) for python, and then restart the client: v{update.latest}

) diff --git a/client/src/playback/Actions.ts b/client/src/playback/Actions.ts index 6c02459b..32f7215e 100644 --- a/client/src/playback/Actions.ts +++ b/client/src/playback/Actions.ts @@ -93,7 +93,7 @@ export const ACTION_DEFINITIONS: Record { diff --git a/client/src/playback/Bodies.ts b/client/src/playback/Bodies.ts index 7712dc55..fcb18878 100644 --- a/client/src/playback/Bodies.ts +++ b/client/src/playback/Bodies.ts @@ -115,7 +115,7 @@ export default class Bodies { // Update properties body.pos = { x: turn.x(), y: turn.y() } - body.hp = turn.health() + body.hp = Math.max(turn.health(), 0) body.paint = turn.paint() body.moveCooldown = turn.moveCooldown() body.actionCooldown = turn.actionCooldown() diff --git a/client/src/playback/Match.ts b/client/src/playback/Match.ts index f3d7cb1a..e2fc95f9 100644 --- a/client/src/playback/Match.ts +++ b/client/src/playback/Match.ts @@ -108,8 +108,9 @@ export default class Match { for (let i = 0; i < footer.timelineMarkersLength(); i++) { const marker = footer.timelineMarkers(i)! + // Add one to round so that the visualizer properly shows the action completed state this.timelineMarkers.push({ - round: marker.round(), + round: marker.round() + 1, team: marker.team(), colorHex: marker.colorHex(), label: marker.label() ?? 'Unknown' diff --git a/schema/java/battlecode/schema/WinType.java b/schema/java/battlecode/schema/WinType.java index 81f37ea7..c6f981cb 100644 --- a/schema/java/battlecode/schema/WinType.java +++ b/schema/java/battlecode/schema/WinType.java @@ -7,14 +7,15 @@ public final class WinType { private WinType() { } public static final byte RESIGNATION = 0; public static final byte MAJORITY_PAINTED = 1; - public static final byte AREA_PAINTED = 2; - public static final byte MORE_TOWERS = 3; - public static final byte MORE_MONEY = 4; - public static final byte MORE_STORED_PAINT = 5; - public static final byte MORE_ROBOTS = 6; - public static final byte COIN_FLIP = 7; + public static final byte ALL_UNITS_DESTROYED = 2; + public static final byte AREA_PAINTED = 3; + public static final byte MORE_TOWERS = 4; + public static final byte MORE_MONEY = 5; + public static final byte MORE_STORED_PAINT = 6; + public static final byte MORE_ROBOTS = 7; + public static final byte COIN_FLIP = 8; - public static final String[] names = { "RESIGNATION", "MAJORITY_PAINTED", "AREA_PAINTED", "MORE_TOWERS", "MORE_MONEY", "MORE_STORED_PAINT", "MORE_ROBOTS", "COIN_FLIP", }; + public static final String[] names = { "RESIGNATION", "MAJORITY_PAINTED", "ALL_UNITS_DESTROYED", "AREA_PAINTED", "MORE_TOWERS", "MORE_MONEY", "MORE_STORED_PAINT", "MORE_ROBOTS", "COIN_FLIP", }; public static String name(int e) { return names[e]; } } diff --git a/schema/js/battlecode/schema/win-type.d.ts b/schema/js/battlecode/schema/win-type.d.ts index ddf1fb1d..20c7ccdf 100644 --- a/schema/js/battlecode/schema/win-type.d.ts +++ b/schema/js/battlecode/schema/win-type.d.ts @@ -1,10 +1,11 @@ export declare enum WinType { RESIGNATION = 0, MAJORITY_PAINTED = 1, - AREA_PAINTED = 2, - MORE_TOWERS = 3, - MORE_MONEY = 4, - MORE_STORED_PAINT = 5, - MORE_ROBOTS = 6, - COIN_FLIP = 7 + ALL_UNITS_DESTROYED = 2, + AREA_PAINTED = 3, + MORE_TOWERS = 4, + MORE_MONEY = 5, + MORE_STORED_PAINT = 6, + MORE_ROBOTS = 7, + COIN_FLIP = 8 } diff --git a/schema/js/battlecode/schema/win-type.js b/schema/js/battlecode/schema/win-type.js index 8d1f4422..fa464d2e 100644 --- a/schema/js/battlecode/schema/win-type.js +++ b/schema/js/battlecode/schema/win-type.js @@ -7,10 +7,11 @@ var WinType; (function (WinType) { WinType[WinType["RESIGNATION"] = 0] = "RESIGNATION"; WinType[WinType["MAJORITY_PAINTED"] = 1] = "MAJORITY_PAINTED"; - WinType[WinType["AREA_PAINTED"] = 2] = "AREA_PAINTED"; - WinType[WinType["MORE_TOWERS"] = 3] = "MORE_TOWERS"; - WinType[WinType["MORE_MONEY"] = 4] = "MORE_MONEY"; - WinType[WinType["MORE_STORED_PAINT"] = 5] = "MORE_STORED_PAINT"; - WinType[WinType["MORE_ROBOTS"] = 6] = "MORE_ROBOTS"; - WinType[WinType["COIN_FLIP"] = 7] = "COIN_FLIP"; + WinType[WinType["ALL_UNITS_DESTROYED"] = 2] = "ALL_UNITS_DESTROYED"; + WinType[WinType["AREA_PAINTED"] = 3] = "AREA_PAINTED"; + WinType[WinType["MORE_TOWERS"] = 4] = "MORE_TOWERS"; + WinType[WinType["MORE_MONEY"] = 5] = "MORE_MONEY"; + WinType[WinType["MORE_STORED_PAINT"] = 6] = "MORE_STORED_PAINT"; + WinType[WinType["MORE_ROBOTS"] = 7] = "MORE_ROBOTS"; + WinType[WinType["COIN_FLIP"] = 8] = "COIN_FLIP"; })(WinType || (exports.WinType = WinType = {})); diff --git a/schema/python/battlecode/schema/MatchFooter.pyi b/schema/python/battlecode/schema/MatchFooter.pyi index 3cc1579b..fc2acead 100644 --- a/schema/python/battlecode/schema/MatchFooter.pyi +++ b/schema/python/battlecode/schema/MatchFooter.pyi @@ -18,7 +18,7 @@ class MatchFooter(object): def GetRootAsMatchFooter(cls, buf: bytes, offset: int) -> MatchFooter: ... def Init(self, buf: bytes, pos: int) -> None: ... def Winner(self) -> int: ... - def WinType(self) -> typing.Literal[WinType.RESIGNATION, WinType.MAJORITY_PAINTED, WinType.AREA_PAINTED, WinType.MORE_TOWERS, WinType.MORE_MONEY, WinType.MORE_STORED_PAINT, WinType.MORE_ROBOTS, WinType.COIN_FLIP]: ... + def WinType(self) -> typing.Literal[WinType.RESIGNATION, WinType.MAJORITY_PAINTED, WinType.ALL_UNITS_DESTROYED, WinType.AREA_PAINTED, WinType.MORE_TOWERS, WinType.MORE_MONEY, WinType.MORE_STORED_PAINT, WinType.MORE_ROBOTS, WinType.COIN_FLIP]: ... def TotalRounds(self) -> int: ... def TimelineMarkers(self, i: int) -> TimelineMarker | None: ... def TimelineMarkersLength(self) -> int: ... @@ -29,7 +29,7 @@ class MatchFooter(object): def MatchFooterStart(builder: flatbuffers.Builder) -> None: ... def Start(builder: flatbuffers.Builder) -> None: ... def MatchFooterAddWinner(builder: flatbuffers.Builder, winner: int) -> None: ... -def MatchFooterAddWinType(builder: flatbuffers.Builder, winType: typing.Literal[WinType.RESIGNATION, WinType.MAJORITY_PAINTED, WinType.AREA_PAINTED, WinType.MORE_TOWERS, WinType.MORE_MONEY, WinType.MORE_STORED_PAINT, WinType.MORE_ROBOTS, WinType.COIN_FLIP]) -> None: ... +def MatchFooterAddWinType(builder: flatbuffers.Builder, winType: typing.Literal[WinType.RESIGNATION, WinType.MAJORITY_PAINTED, WinType.ALL_UNITS_DESTROYED, WinType.AREA_PAINTED, WinType.MORE_TOWERS, WinType.MORE_MONEY, WinType.MORE_STORED_PAINT, WinType.MORE_ROBOTS, WinType.COIN_FLIP]) -> None: ... def MatchFooterAddTotalRounds(builder: flatbuffers.Builder, totalRounds: int) -> None: ... def MatchFooterAddTimelineMarkers(builder: flatbuffers.Builder, timelineMarkers: uoffset) -> None: ... def MatchFooterStartTimelineMarkersVector(builder: flatbuffers.Builder, num_elems: int) -> uoffset: ... diff --git a/schema/python/battlecode/schema/WinType.py b/schema/python/battlecode/schema/WinType.py index 2379b1fc..16788c31 100644 --- a/schema/python/battlecode/schema/WinType.py +++ b/schema/python/battlecode/schema/WinType.py @@ -5,9 +5,10 @@ class WinType(object): RESIGNATION = 0 MAJORITY_PAINTED = 1 - AREA_PAINTED = 2 - MORE_TOWERS = 3 - MORE_MONEY = 4 - MORE_STORED_PAINT = 5 - MORE_ROBOTS = 6 - COIN_FLIP = 7 + ALL_UNITS_DESTROYED = 2 + AREA_PAINTED = 3 + MORE_TOWERS = 4 + MORE_MONEY = 5 + MORE_STORED_PAINT = 6 + MORE_ROBOTS = 7 + COIN_FLIP = 8 diff --git a/schema/python/battlecode/schema/WinType.pyi b/schema/python/battlecode/schema/WinType.pyi index ba75ef66..6d81b751 100644 --- a/schema/python/battlecode/schema/WinType.pyi +++ b/schema/python/battlecode/schema/WinType.pyi @@ -11,6 +11,7 @@ uoffset: typing.TypeAlias = flatbuffers.number_types.UOffsetTFlags.py_type class WinType(object): RESIGNATION: int MAJORITY_PAINTED: int + ALL_UNITS_DESTROYED: int AREA_PAINTED: int MORE_TOWERS: int MORE_MONEY: int diff --git a/schema/ts/battlecode/schema/win-type.ts b/schema/ts/battlecode/schema/win-type.ts index 73b539e4..9d23fc06 100644 --- a/schema/ts/battlecode/schema/win-type.ts +++ b/schema/ts/battlecode/schema/win-type.ts @@ -5,10 +5,11 @@ export enum WinType { RESIGNATION = 0, MAJORITY_PAINTED = 1, - AREA_PAINTED = 2, - MORE_TOWERS = 3, - MORE_MONEY = 4, - MORE_STORED_PAINT = 5, - MORE_ROBOTS = 6, - COIN_FLIP = 7 + ALL_UNITS_DESTROYED = 2, + AREA_PAINTED = 3, + MORE_TOWERS = 4, + MORE_MONEY = 5, + MORE_STORED_PAINT = 6, + MORE_ROBOTS = 7, + COIN_FLIP = 8 } diff --git a/specs/specs.pdf b/specs/specs.pdf index 8c44d417..fc83c38f 100644 Binary files a/specs/specs.pdf and b/specs/specs.pdf differ