Created
January 30, 2014 16:13
-
-
Save jsam/8712162 to your computer and use it in GitHub Desktop.
[DSTG] Zadatak 3.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TEZINE_PLOCE = [ | |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
0, 120, -20, 20, 5, 5, 20, -20, 120, 0, | |
0, -20, -40, -5, -5, -5, -5, -40, -20, 0, | |
0, 20, -5, 15, 3, 3, 15, -5, 20, 0, | |
0, 5, -5, 3, 3, 3, 3, -5, 5, 0, | |
0, 5, -5, 3, 3, 3, 3, -5, 5, 0, | |
0, 20, -5, 15, 3, 3, 15, -5, 20, 0, | |
0, -20, -40, -5, -5, -5, -5, -40, -20, 0, | |
0, 120, -20, 20, 5, 5, 20, -20, 120, 0, | |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
] | |
def lokmax_rezultat(igrajer, ploca): | |
opp = protivnik(igrajer) | |
total = 0 | |
for sq in pozicije(): | |
if ploca[sq] == igrajer: | |
total += TEZINE_PLOCE[sq] | |
elif ploca[sq] == opp: | |
total -= TEZINE_PLOCE[sq] | |
return total |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment