diff --git a/core/src/main/java/nl/andrewlalis/aos_core/geom/Vec2.java b/core/src/main/java/nl/andrewlalis/aos_core/geom/Vec2.java index 9d4d62f..64f0f9a 100644 --- a/core/src/main/java/nl/andrewlalis/aos_core/geom/Vec2.java +++ b/core/src/main/java/nl/andrewlalis/aos_core/geom/Vec2.java @@ -6,6 +6,9 @@ import java.io.Serializable; import java.util.Random; import java.util.concurrent.ThreadLocalRandom; +/** + * A two-dimensional, floating-point vector consisting of an x- and y-component. + */ public record Vec2(float x, float y) implements Serializable { public static final Vec2 ZERO = new Vec2(0, 0); public static final Vec2 UP = new Vec2(0, -1); diff --git a/core/src/main/java/nl/andrewlalis/aos_core/model/Player.java b/core/src/main/java/nl/andrewlalis/aos_core/model/Player.java index 3a1f9e7..3d73703 100644 --- a/core/src/main/java/nl/andrewlalis/aos_core/model/Player.java +++ b/core/src/main/java/nl/andrewlalis/aos_core/model/Player.java @@ -27,6 +27,7 @@ public class Player extends PhysicsObject implements Comparable { private transient int deathCount; private transient int shotCount; private transient int resupplyCount; + private transient int killStreak; public Player(int id, String name, Team team, GunType gunType, float maxHealth) { this.id = id; @@ -168,12 +169,18 @@ public class Player extends PhysicsObject implements Comparable { return resupplyCount; } + public int getKillStreak() { + return killStreak; + } + public void incrementDeathCount() { this.deathCount++; + this.killStreak = 0; } public void incrementKillCount() { this.killCount++; + this.killStreak++; } public void resetStats() {