Compare commits
2 Commits
go-zveza
...
b2f2e033dc
Author | SHA1 | Date | |
---|---|---|---|
b2f2e033dc | |||
e9f2bafcdc |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -8,3 +8,6 @@ target
|
|||||||
*.iml
|
*.iml
|
||||||
*~
|
*~
|
||||||
pairgoth.db
|
pairgoth.db
|
||||||
|
ratings
|
||||||
|
pairgoth
|
||||||
|
pairgoth.tar.gz
|
@@ -1,3 +1,5 @@
|
|||||||
|
# This is largely a mirror of the original, adapted for the Slovenian Go Association.
|
||||||
|
|
||||||
# Pairgoth
|
# Pairgoth
|
||||||
|
|
||||||
Welcome to Pairgoth, your Go Pairing Engine!
|
Welcome to Pairgoth, your Go Pairing Engine!
|
||||||
|
@@ -132,7 +132,7 @@ ${
|
|||||||
player.getString("num")!!.padStart(4, ' ')
|
player.getString("num")!!.padStart(4, ' ')
|
||||||
} ${
|
} ${
|
||||||
"${
|
"${
|
||||||
player.getString("name")?.toSnake(true)
|
player.getString("name")?.toSnake()
|
||||||
|
|
||||||
} ${
|
} ${
|
||||||
player.getString("firstname")?.toSnake() ?: ""
|
player.getString("firstname")?.toSnake() ?: ""
|
||||||
|
23
build.sh
Executable file
23
build.sh
Executable file
@@ -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/
|
@@ -1,4 +1,3 @@
|
|||||||
#macro(rank $rank)#if( $rank<0 )#set( $k = -$rank )${k}k#else#set( $d=$rank+1 )${d}d#end#end
|
|
||||||
#if (!$tour)
|
#if (!$tour)
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h2 class="error">Invalid tournament id</h2>
|
<h2 class="error">Invalid tournament id</h2>
|
||||||
@@ -28,60 +27,36 @@
|
|||||||
#stop
|
#stop
|
||||||
#end
|
#end
|
||||||
#set($games = $utils.removeBye($roundPairing.games))
|
#set($games = $utils.removeBye($roundPairing.games))
|
||||||
#set($pages = ($games.size() + 3) / 4)
|
|
||||||
#set($items = $pages * 4)
|
<table>
|
||||||
#foreach($i in [1..$items])
|
<tr>
|
||||||
#set($j = ($i - 1) / 4 + (($i - 1) % 4) * $pages)
|
<th>Table</th>
|
||||||
#if($j < $games.size())
|
<th>Black</th>
|
||||||
#set($game = $games[$j])
|
<th>White</th>
|
||||||
|
<th>Handicap</th>
|
||||||
|
<th>Komi</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
#set($numOfPlay = $games.size() - 1)
|
||||||
|
#foreach($i in [0..$numOfPlay])
|
||||||
|
|
||||||
|
#set($game = $games[$i])
|
||||||
#set($white = $pmap[$game.w])
|
#set($white = $pmap[$game.w])
|
||||||
#set($black = $pmap[$game.b])
|
#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)
|
|
||||||
<div class="page">
|
|
||||||
#end
|
|
||||||
|
|
||||||
<div class="page-item">
|
|
||||||
<div class="title">$tour.name</div>
|
|
||||||
<div class="subtitle"></div>
|
|
||||||
<div class="details">
|
|
||||||
<div>Table $game.t</div>
|
|
||||||
#set($komi = $tour.komi)
|
#set($komi = $tour.komi)
|
||||||
#if($game.h) #set($komi = $komi - $math.floor($komi)) #end
|
#if($game.h) #set($komi = $komi - $math.floor($komi)) #end
|
||||||
<div>Handicap $game.h ‐ Komi $komi</div>
|
#set($table = $i + 1)
|
||||||
<div>Round $round</div>
|
<tr>
|
||||||
</div>
|
<td>Table $table</td>
|
||||||
<div class="instructions">
|
<td>$black.name $!black.firstname</td>
|
||||||
Surround winner's name or ½-½
|
<td>$white.name $!white.firstname</td>
|
||||||
</div>
|
<td>$game.h</td>
|
||||||
<div class="players">
|
<td>$komi</td>
|
||||||
<div class="white player">
|
</tr>
|
||||||
<div class="color">White</div>
|
#end
|
||||||
<div class="name">$white.name $!white.firstname #rank($white.rank)<br/>#if($white.country)($white.country.toUpperCase()#if($white.club), $white.club#end)#end</div>
|
|
||||||
## <div class="pin">$white.egf</div>
|
</table>
|
||||||
</div>
|
|
||||||
<div class="equal">½-½</div>
|
|
||||||
<div class="black player">
|
|
||||||
<div class="color">Black</div>
|
|
||||||
<div class="name">$black.name $!black.firstname #rank($black.rank)<br/>#if($black.country)($black.country.toUpperCase()#if($black.club), $black.club#end)#end</div>
|
|
||||||
## <div class="pin">$black.egf</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="signatures">
|
|
||||||
<div class="signature">Signature:</div>
|
|
||||||
<div class="equal"> </div>
|
|
||||||
<div class="signature">Signature:</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
#if($foreach.index % 4 == 3)
|
|
||||||
</div>
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
|
@@ -18,21 +18,21 @@
|
|||||||
<table id="results-table" class="ui celled striped table">
|
<table id="results-table" class="ui celled striped table">
|
||||||
<thead class="centered">
|
<thead class="centered">
|
||||||
<th data-sort-method="number">table</th>
|
<th data-sort-method="number">table</th>
|
||||||
<th>white</th>
|
|
||||||
<th>black</th>
|
<th>black</th>
|
||||||
|
<th>white</th>
|
||||||
<th>hd</th>
|
<th>hd</th>
|
||||||
<th>result</th>
|
<th>result</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
#set($dispRst = {'?':'?', 'w':'1-0', 'b':'0-1', '=':'½-½', 'X':'X', '#':'1-1', '0':'0-0'})
|
#set($dispRst = {'?':'?', 'w':'0-1', 'b':'1-0', '=':'½-½', 'X':'X', '#':'1-1', '0':'0-0'})
|
||||||
#foreach($game in $individualGames)
|
#foreach($game in $individualGames)
|
||||||
#set($white = $plmap[$game.w])
|
#set($white = $plmap[$game.w])
|
||||||
#set($black = $plmap[$game.b])
|
#set($black = $plmap[$game.b])
|
||||||
#if($black && $white)
|
#if($black && $white)
|
||||||
<tr id="result-$game.id" data-id="$game.id">
|
<tr id="result-$game.id" data-id="$game.id">
|
||||||
<td data-sort="$game.t">${game.t}.</td>
|
<td data-sort="$game.t">${game.t}.</td>
|
||||||
<td class="white player #if($game.r == 'w' || $game.r == '#') winner #elseif($game.r == 'b' || $game.r == '0') looser #end" data-id="$white.id" data-sort="$white.name#if($white.firstname) $white.firstname#end"><span>#if($white)$white.name#if($white.firstname) $white.firstname#end #rank($white.rank)#{else}BIP#end</span></td>
|
|
||||||
<td class="black player #if($game.r == 'b' || $game.r == '#') winner #elseif($game.r == 'w' || $game.r == '0') looser #end" data-id="$black.id" data-sort="$black.name#if($black.firstname) $black.firstname#end"><span>#if($black)$black.name#if($black.firstname) $black.firstname#end #rank($black.rank)#{else}BIP#end</span></td>
|
<td class="black player #if($game.r == 'b' || $game.r == '#') winner #elseif($game.r == 'w' || $game.r == '0') looser #end" data-id="$black.id" data-sort="$black.name#if($black.firstname) $black.firstname#end"><span>#if($black)$black.name#if($black.firstname) $black.firstname#end #rank($black.rank)#{else}BIP#end</span></td>
|
||||||
|
<td class="white player #if($game.r == 'w' || $game.r == '#') winner #elseif($game.r == 'b' || $game.r == '0') looser #end" data-id="$white.id" data-sort="$white.name#if($white.firstname) $white.firstname#end"><span>#if($white)$white.name#if($white.firstname) $white.firstname#end #rank($white.rank)#{else}BIP#end</span></td>
|
||||||
<td class="handicap centered">$!game.h</td>
|
<td class="handicap centered">$!game.h</td>
|
||||||
<td class="result centered" data-sort="$game.r" data-result="$game.r">$dispRst[$game.r]</td>
|
<td class="result centered" data-sort="$game.r" data-result="$game.r">$dispRst[$game.r]</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
Reference in New Issue
Block a user