diff --git a/libs/jogador.c b/libs/jogador.c index e96b375eec791f9fbcb5f239314ec6a319017e1a..81beaf41e80bf4f3b8a89f212a26d945c8842f47 100644 --- a/libs/jogador.c +++ b/libs/jogador.c @@ -108,7 +108,7 @@ int calculaBonus(Vertice v, Lista filhos) { for(No n = primeiroNoLista(v->filhos); n; n = getSucessorNo(n)) { Vertice filho = getConteudo(n); // Se o filho não está na lsita filhos e não está no grupo de vértices já consumidos - if(!pertenceLista(filho, filhos) && !filho->grupo) { + if(!filho->grupo && !pertenceLista(filho, filhos)) { bonus += filho->peso; } } diff --git a/tests/runTests.sh b/tests/runTests.sh index 359beedd89058b632ce5e0e676f8ea80f1809f68..46c5f05ff73d5f267ef650decc47f7329d70fe97 100755 --- a/tests/runTests.sh +++ b/tests/runTests.sh @@ -4,10 +4,10 @@ tempo_max=10000 #10s # tamanhos do tabuleiro -tams=(4 8 16 32 64 128 256) +tams=(4 8 16 32 64 128) # lista de cores -cores=(2 4 8 16 32) +cores=(2 4 8 16) #-- Cores do terminal RED='\033[0;31m' @@ -40,7 +40,7 @@ do # echo "Usando semente: ${semente}" ./test $i $j $cor $semente T_inicial=$(date +%s%N) - ../main < "/tmp/${semente}.in" + ../main < "/tmp/${semente}.in" > /dev/null T_gasto=$(($(date +%s%N) - $T_inicial)) T_soma_cor=$(($T_gasto + $T_soma_cor)) T_soma_total=$(($T_gasto + $T_soma_total))