Prepared grid config logic

This commit is contained in:
Mysaa Java
2026-09-04 22:42:04 +02:00
parent cfccdcea5e
commit 3b68f3f42f
8 changed files with 355 additions and 202 deletions
@@ -0,0 +1,54 @@
package com.bernard.nodecames.model;
import java.util.List;
import java.util.Set;
import com.bernard.nodecames.model.Card.Color;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Value;
@Getter
@AllArgsConstructor
public class GridConfig {
// Immutable options
// Maximum of maximom number of hints
// This is to trigger end of game
private int maxMaxHint;//TODO
private boolean structuredGrid;//TODO
private boolean anyoneStarts;
private List<CardColors> wordDistribution;
// Mutable options
private int maxHint;//TODO
private Set<Integer> availableHintWordCount;//TODO
private boolean oneMoreGuess;//TODO
private int hintMaxLength;//TODO
private boolean endGuessing;//TODO
private boolean onlyOneGreenGreen;//TODO
private boolean suddenDeath;//TODO
private boolean hintsInARow;//TODO
public int getWordCount() {
return wordDistribution.size();
}
@Value(staticConstructor = "of")
public static final class CardColors {
Color faceA;
Color faceB;
public static final CardColors WW = CardColors.of(Color.WHITE, Color.WHITE);
public static final CardColors WB = CardColors.of(Color.WHITE, Color.BLACK);
public static final CardColors BW = CardColors.of(Color.BLACK, Color.WHITE);
public static final CardColors WG = CardColors.of(Color.WHITE, Color.GREEN);
public static final CardColors GW = CardColors.of(Color.GREEN, Color.WHITE);
public static final CardColors GG = CardColors.of(Color.GREEN, Color.GREEN);
public static final CardColors GB = CardColors.of(Color.GREEN, Color.BLACK);
public static final CardColors BG = CardColors.of(Color.BLACK, Color.GREEN);
public static final CardColors BB = CardColors.of(Color.BLACK, Color.BLACK);
}
}