Done
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -8,3 +8,6 @@ target
|
||||
*.iml
|
||||
*~
|
||||
pairgoth.db
|
||||
ratings
|
||||
pairgoth
|
||||
pairgoth.tar.gz
|
@@ -132,7 +132,7 @@ ${
|
||||
player.getString("num")!!.padStart(4, ' ')
|
||||
} ${
|
||||
"${
|
||||
player.getString("name")?.toSnake(true)
|
||||
player.getString("name")?.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 -agentlib:jdwp=transport=dt_socket,server=y,suspend=n -Dpairgoth.mode=standalone -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)
|
||||
<div class="section">
|
||||
<h2 class="error">Invalid tournament id</h2>
|
||||
@@ -28,60 +27,36 @@
|
||||
#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)
|
||||
<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>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Table</th>
|
||||
<th>Black</th>
|
||||
<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($black = $pmap[$game.b])
|
||||
#set($komi = $tour.komi)
|
||||
#if($game.h) #set($komi = $komi - $math.floor($komi)) #end
|
||||
<div>Handicap $game.h ‐ Komi $komi</div>
|
||||
<div>Round $round</div>
|
||||
</div>
|
||||
<div class="instructions">
|
||||
Surround winner's name or ½-½
|
||||
</div>
|
||||
<div class="players">
|
||||
<div class="white player">
|
||||
<div class="color">White</div>
|
||||
<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>
|
||||
</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
|
||||
#set($table = $i + 1)
|
||||
<tr>
|
||||
<td>Table $table</td>
|
||||
<td>$black.name $!black.firstname</td>
|
||||
<td>$white.name $!white.firstname</td>
|
||||
<td>$game.h</td>
|
||||
<td>$komi</td>
|
||||
</tr>
|
||||
#end
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
onLoad(() => {
|
||||
|
@@ -18,21 +18,21 @@
|
||||
<table id="results-table" class="ui celled striped table">
|
||||
<thead class="centered">
|
||||
<th data-sort-method="number">table</th>
|
||||
<th>white</th>
|
||||
<th>black</th>
|
||||
<th>white</th>
|
||||
<th>hd</th>
|
||||
<th>result</th>
|
||||
</thead>
|
||||
<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)
|
||||
#set($white = $plmap[$game.w])
|
||||
#set($black = $plmap[$game.b])
|
||||
#if($black && $white)
|
||||
<tr id="result-$game.id" data-id="$game.id">
|
||||
<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="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="result centered" data-sort="$game.r" data-result="$game.r">$dispRst[$game.r]</td>
|
||||
</tr>
|
||||
|
Reference in New Issue
Block a user