Removed unused compression
This commit is contained in:
@@ -476,6 +476,10 @@ function recommendThrowaway(depth = 0, thisHand = null, thisDeck = null, chance
|
|||||||
let result = getHandPoints(hands[choice.index]);
|
let result = getHandPoints(hands[choice.index]);
|
||||||
if (!greedyAlgorithm) {
|
if (!greedyAlgorithm) {
|
||||||
result.points = cashOut(hands[choice.index], result, false);
|
result.points = cashOut(hands[choice.index], result, false);
|
||||||
|
if (hands[choice.index].length < handSize) {
|
||||||
|
// create new hands and push all possible permutations
|
||||||
|
// might need a separate loop
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.points > 0) {
|
if (result.points > 0) {
|
||||||
@@ -496,29 +500,6 @@ function recommendThrowaway(depth = 0, thisHand = null, thisDeck = null, chance
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// compress recommendations
|
|
||||||
if (choices.length > 0) {
|
|
||||||
// recommendations = [...new Set(recommendations)];
|
|
||||||
|
|
||||||
// only allow one recommendation per pattern
|
|
||||||
// let newRecs = [];
|
|
||||||
// for (let rec of recommendations) {
|
|
||||||
// if (!newRecs.map(newRec => newRec.pattern).includes(rec.pattern)) {
|
|
||||||
// newRecs.push(rec);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// only allow one recommendation per signature
|
|
||||||
// let newRecs = [];
|
|
||||||
// for (let rec of recommendations) {
|
|
||||||
// if (!newRecs.map(newRec => newRec.cardSignature).includes(rec.cardSignature)) {
|
|
||||||
// newRecs.push(rec);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// recommendations = newRecs;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let choice of choices) {
|
for (let choice of choices) {
|
||||||
if (!choice.points) {
|
if (!choice.points) {
|
||||||
choice.points = 0;
|
choice.points = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user