diff options
author | tomsmeding <hallo@tomsmeding.nl> | 2015-04-27 20:36:43 +0200 |
---|---|---|
committer | tomsmeding <hallo@tomsmeding.nl> | 2015-04-27 20:36:43 +0200 |
commit | f7cf72b6a1cd5373f39e025ae260561e33a91e8e (patch) | |
tree | a105ddb53ef8e07eacbf723637dfe3ff75eaa5de | |
parent | e3c5e6c4e7f5e48fcb9d8f317628b87c8a78b1cf (diff) |
Update charm and add to makefile
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | charm.cpp | 5 |
2 files changed, 8 insertions, 2 deletions
@@ -1,6 +1,6 @@ .PHONY: all clean -BINARIES = neutrino randino gluon photon viewcompetition +BINARIES = neutrino randino gluon photon viewcompetition charm all: $(BINARIES) @@ -19,6 +19,9 @@ photon: photon.cc higgs.o randino: randino.cpp g++ -Wall -std=c++11 -O2 -o randino randino.cpp +charm: charm.cpp + g++ -Wall -std=c++11 -O2 -o charm charm.cpp + higgs.o: higgs.cc g++ -Wall -std=c++11 -O2 -c -o higgs.o higgs.cc @@ -109,7 +109,10 @@ int scorefor(const Board &bd){ for(i=0;i<S*S;i++){ if(bd.grid[i]==1)score+=i/S; else if(bd.grid[i]==2)score-=i/S; - else if(bd.grid[i]==3)score-=(i/S)*(i/S); + else if(bd.grid[i]==3){ + score-=(i/S)*(i/S); + if(i<S)score+=10000; + } } return score; } |