e-champ-durak-thrifty
Advanced tools
Comparing version 1.0.0 to 1.0.2
@@ -9,3 +9,5 @@ /** | ||
label: 'Thrifty', | ||
solver: { | ||
Class: require('../Thrifty') | ||
}, | ||
translations: { | ||
@@ -15,6 +17,3 @@ 'ru': { | ||
} | ||
}, | ||
solver: { | ||
Class: require('../Thrifty') | ||
} | ||
}; |
{ | ||
"name": "e-champ-durak-thrifty", | ||
"version": "1.0.0", | ||
"version": "1.0.2", | ||
"description": "Bot for playing E-Champ Durak", | ||
@@ -5,0 +5,0 @@ "author": "Maxim Khorin", |
# Durak Thrifty Bot | ||
### Bot for playing [E-Champ Durak](https://github.com/mkhorin/e-champ-durak) | ||
### Computer opponent for playing [E-Champ Durak](https://github.com/mkhorin/e-champ-durak) | ||
This strategy expands the standard by taking care of the high cards, | ||
so as not to lose them at the beginning. |
@@ -19,4 +19,4 @@ /** | ||
getTransferCard () { | ||
const card = super.getTransferCard(); | ||
getCardToTransfer () { | ||
const card = super.getCardToTransfer(); | ||
if (!card || this.stock < this.minStockSizeToSaveTransfer) { | ||
@@ -30,4 +30,4 @@ return card; | ||
getDefendingPairs () { | ||
const pairs = super.getDefendingPairs(); | ||
getPairsToDefend () { | ||
const pairs = super.getPairsToDefend(); | ||
if (!pairs.length | ||
@@ -67,4 +67,4 @@ || this.cards.length === pairs.length | ||
resolveAttack (cards) { | ||
cards = this.filterLowestCards(cards); | ||
getCardsToNormalAttack (validCards) { | ||
const cards = this.filterLowestCards(validCards); | ||
if (this.stock < this.minStockSizeToSaveAttack || !this.table.length || !cards.length) { | ||
@@ -71,0 +71,0 @@ return cards; |
12821