1
0
mirror of https://github.com/exane/not-gwent-online synced 2025-09-19 06:39:10 +00:00
This commit is contained in:
exane
2015-06-26 14:40:19 +02:00
parent d8d0962a5f
commit 230b21143d
4 changed files with 26 additions and 2 deletions

View File

@@ -138,11 +138,13 @@ var Field = (function(){
this._hornCard = card;
}
r.getHighestCards = function() {
r.getHighestCards = function(noHeroes) {
noHeroes = noHeroes || false;
var res = [];
var highest = 0;
this.get().forEach(function(card) {
if(noHeroes && card.getAbility("hero")) return;
highest = card.getPower() > highest ? card.getPower() : highest;
})