diff --git a/.gitignore b/.gitignore index 5771b3c..8df9780 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ target *.iml *~ pairgoth.db +ratings +pairgoth +pairgoth.tar.gz \ No newline at end of file diff --git a/README.md b/README.md index ca3c84c..8234e27 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +# This is largely a mirror of the original, adapted for the Slovenian Go Association. + # Pairgoth Welcome to Pairgoth, your Go Pairing Engine! diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..5b28106 --- /dev/null +++ b/build.sh @@ -0,0 +1,23 @@ +mkdir pairgoth +cp application/target/pairgoth-engine.jar pairgoth/ + +echo "#!/bin/bash" > pairgoth/run.sh +echo "./jdk-11.0.28+6-jre/bin/java -jar pairgoth-engine.jar" >> pairgoth/run.sh + +echo "#!/bin/bash" > pairgoth/get_java.sh +echo "wget https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.28%2B6/OpenJDK11U-jre_x64_linux_hotspot_11.0.28_6.tar.gz" >> pairgoth/get_java.sh +echo "tar -xzf OpenJDK11U-jre_x64_linux_hotspot_11.0.28_6.tar.gz" >> pairgoth/get_java.sh + +chmod +x pairgoth/run.sh +chmod +x pairgoth/get_java.sh + + +echo "" > pairgoth/pairgoth.properties +echo "webapp.env = prod" >> pairgoth/pairgoth.properties +echo "webapp.url = http://localhost:8080" >> pairgoth/pairgoth.properties +echo "auth = none" >> pairgoth/pairgoth.properties +echo "logger.level = info" >> pairgoth/pairgoth.properties +echo "rating.ffg.enable = false" >> pairgoth/pairgoth.properties +echo "webapp.protocol = http" >> pairgoth/pairgoth.properties + +tar -czvf pairgoth.tar.gz pairgoth/ \ No newline at end of file diff --git a/view-webapp/src/main/resources/examples/20251111-Template.tour b/view-webapp/src/main/resources/examples/20251111-Template.tour new file mode 100644 index 0000000..c52335f --- /dev/null +++ b/view-webapp/src/main/resources/examples/20251111-Template.tour @@ -0,0 +1 @@ +{"id":4,"type":"INDIVIDUAL","name":"Template","shortName":"20251111-Template","startDate":"2025-11-11","endDate":"2025-11-11","director":"","country":"si","location":"Template","online":false,"komi":6.5,"rules":"JAPANESE","gobanSize":19,"timeSystem":{"type":"CANADIAN","mainTime":2400,"byoyomi":300,"stones":15},"rounds":5,"pairing":{"type":"MAC_MAHON","base":{"nx1":0.5,"dupWeight":5.0E14,"random":0.0,"deterministic":true,"colorBalanceWeight":1000000.0},"main":{"catWeight":2.0E13,"scoreWeight":1.0E11,"upDownWeight":1.0E8,"upDownCompensate":true,"upDownLowerMode":"MIDDLE","upDownUpperMode":"MIDDLE","maximizeSeeding":5000000.0,"firstSeedLastRound":2,"firstSeed":"SPLIT_AND_RANDOM","secondSeed":"SPLIT_AND_FOLD","firstSeedAddCrit":"RATING","secondSeedAddCrit":"NONE","mmsValueAbsent":0.5,"roundDownScore":true,"sosValueAbsentUseBase":true},"secondary":{"barThreshold":true,"rankThreshold":0,"winsThreshold":true,"secWeight":1.0E11},"geo":{"weight":1.0E11,"mmsDiffCountry":1,"mmsDiffClubGroup":3,"mmsDiffClub":3},"handicap":{"weight":0.0,"useMMS":false,"threshold":8,"correction":2,"ceiling":9},"placement":["MMS","SOSM","SOSOSM"],"mmFloor":-20,"mmBar":0},"players":[],"games":[[]]} \ No newline at end of file diff --git a/view-webapp/src/main/webapp/result-sheets.html b/view-webapp/src/main/webapp/result-sheets.html index 003abf3..162287a 100644 --- a/view-webapp/src/main/webapp/result-sheets.html +++ b/view-webapp/src/main/webapp/result-sheets.html @@ -28,70 +28,40 @@ #stop #end #set($games = $utils.removeBye($roundPairing.games)) -#set($pages = ($games.size() + 3) / 4) -#set($items = $pages * 4) -#foreach($i in [1..$items]) - #set($j = ($i - 1) / 4 + (($i - 1) % 4) * $pages) - #if($j < $games.size()) - #set($game = $games[$j]) - #set($white = $pmap[$game.w]) - #set($black = $pmap[$game.b]) - #else - #set($game = { 't': 'xxx', 'h': 'xxx' }) - #set($white = { 'name': 'xxx', 'firstname': 'xxx', 'rank': -99, 'country': 'XX', 'club': 'xxx' }) - #set($black = { 'name': 'xxx', 'firstname': 'xxx', 'rank': -99, 'country': 'XX', 'club': 'xxx' }) - #end - #if($foreach.index % 4 == 0) -
- #end -
-
$tour.name
-
-
-
Table $game.t
+ + + + + + + + + + + +#set($numOfPlay = $games.size() - 1) +#foreach($i in [0..$numOfPlay]) + + #set($game = $games[$i]) + #set($white = $pmap[$game.w]) + #set($black = $pmap[$game.b]) #set($komi = $tour.komi) #if($game.h) #set($komi = $komi - $math.floor($komi)) #end -
Handicap $game.h  ‐  Komi $komi
-
Round $round
- -
- Surround winner's name or ½-½ -
-
-#if($blackFirst) -
-
Black
-
$black.name $!black.firstname #rank($black.rank)
#if($black.country)($black.country.toUpperCase()#if($black.club), $black.club#end)#end
-
-
½-½
-
-
White
-
$white.name $!white.firstname #rank($white.rank)
#if($white.country)($white.country.toUpperCase()#if($white.club), $white.club#end)#end
-
-#else -
-
White
-
$white.name $!white.firstname #rank($white.rank)
#if($white.country)($white.country.toUpperCase()#if($white.club), $white.club#end)#end
-
-
½-½
-
-
Black
-
$black.name $!black.firstname #rank($black.rank)
#if($black.country)($black.country.toUpperCase()#if($black.club), $black.club#end)#end
-
+ #set($table = $i + 1) +
+ + + + + + + + #end - -
-
Signature:
-
   
-
Signature:
-
- - #if($foreach.index % 4 == 3) - - #end -#end +
TableBlackRankWhiteRankHandicapKomi
Table $table$black.name $!black.firstname#rank($black.rank)$white.name $!white.firstname#rank($white.rank)$game.h$komi
+