added SpaceSnake #5

Merged
MineTec merged 8 commits from develop-spaceSnake into develop 2025-10-15 20:11:37 +00:00
Showing only changes of commit a8a15a1c7c - Show all commits

View File

@@ -39,8 +39,8 @@ public class SpaceSnake extends StatelessGame {
private final Map<Player, PlayState> playerBlocks = new WeakHashMap<>();
private int mapSize;
private final Supplier<Integer> posInBoundsW = () -> this.rnd.nextInt(-this.mapSize /2, this.mapSize /2);
private final Supplier<Integer> posInBoundsH = () -> this.rnd.nextInt(-32, 100);
private final Supplier<Integer> posInBoundsW = () -> this.rnd.nextInt(-this.mapSize/2, this.mapSize/2);
private final Supplier<Integer> posInBoundsH = () -> this.rnd.nextInt(-60, 300);
public SpaceSnake(int mapSize, int powerUpCount) {
super(Dimension.THE_END.key, "spaceSnake", new PointsWinScore());
@@ -81,7 +81,7 @@ public class SpaceSnake extends StatelessGame {
@Override
protected boolean onPlayerJoin(Player p) {
Pos spawn = new Pos(this.posInBoundsW.get(), 50, this.posInBoundsW.get());
Pos spawn = new Pos(this.posInBoundsW.get(), -60, this.posInBoundsW.get());
PlayState state = new PlayState(
new AtomicInteger(3),
new ArrayDeque<>(List.of(spawn)),