-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGenState.java
26 lines (25 loc) · 956 Bytes
/
GenState.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/**
* Created by Simon on 06.04.2017.
* Represents a state during the execution of recGetMinSymbolCount
*/
class GenState {
//indicates which state should be executed first
final double score;
final Karte[] cards; //should eventually be transformed into a CardSet
final int symbolsPerCard;
final int cardCount;
final int filledCards;
final int filledSymbols;
final int symbolCountSoFar;
final boolean[] satisfied;
GenState(Karte ncards[], int nsymbolsPerCard, int ncardCount, int nfilledCards, int nfilledSymbols, int nsymbolCountSoFar, boolean nsatisfied[]) {
cards = ncards;
symbolsPerCard = nsymbolsPerCard;
cardCount = ncardCount;
filledCards = nfilledCards;
filledSymbols = nfilledSymbols;
symbolCountSoFar = nsymbolCountSoFar;
satisfied = nsatisfied;
score = (filledCards * symbolsPerCard + filledSymbols) / (float) symbolCountSoFar;
}
}