#begintest koth
#beginconfig
division a a.t
division b b.t
config gibson = 1
config max_rounds = 4
config prize_bands{'A'} = [1,2];
config prize_bands{'B'} = [1,2];
config colour = 'no'
#endconfig
#beginifile a.t
Chew, John 1800    
Chew, Kristen 1300 
Chew, Jamie 500    
Chew, Liam 0       
#endifile
#beginifile b.t
Player, A 1900 4 3 2 ; 400 400 400
Player, B 1800 3 4 1 ; 302 300 300
Player, C 1700 2 1 4 ; 201 200 200
Player, D 1600 1 2 3 ; 100 500 100
#endifile
#begincommands
debug GRT 1
koth 0 0 a
debug GRT 0
koth 0 0 a
koth 0 0 a
sp 3 a
koth 0 0 a
koth 1 0 a
koth 1 0 a
koth 1 3 b
rat b
sp 4 b
q
#endcommands
#beginstdout
Debug: [GIB] PairAllGibsons(4,-1,4,2)
Debug: [GIB] Gibson-equivalent ranks: 1 starting at 1
Debug: [GIB] Gibsons found: 0
Debug: [GRT] pref 1-2 rep=0 prev=0 svr=0 dist=1
Debug: [GRT] pref 1-3 rep=0 prev=0 svr=0 dist=2
Debug: [GRT] pref 1-4 rep=0 prev=0 svr=0 dist=3
Debug: [GRT] pref 1: 2,3,4
Debug: [GRT] pref 2-1 rep=0 prev=0 svr=0 dist=1
Debug: [GRT] pref 2-3 rep=0 prev=0 svr=0 dist=1
Debug: [GRT] pref 2-4 rep=0 prev=0 svr=0 dist=2
Debug: [GRT] pref 2: 1,3,4
Debug: [GRT] pref 3-1 rep=0 prev=0 svr=0 dist=2
Debug: [GRT] pref 3-2 rep=0 prev=0 svr=0 dist=1
Debug: [GRT] pref 3-4 rep=0 prev=0 svr=0 dist=1
Debug: [GRT] pref 3: 2,4,1
Debug: [GRT] pref 4-1 rep=0 prev=0 svr=0 dist=3
Debug: [GRT] pref 4-2 rep=0 prev=0 svr=0 dist=2
Debug: [GRT] pref 4-3 rep=0 prev=0 svr=0 dist=1
Debug: [GRT] pref 4: 3,2,1
Debug: [GRT] Pairings:
Debug: [GRT] ... Chew, John (A1) vs Chew, Kristen (A2).
Debug: [GRT] ... Chew, Jamie (A3) vs Chew, Liam (A4).
Debug: [GIB] PairAllGibsons(4,-1,3,2)
Debug: [GIB] Gibson-equivalent ranks: 1 starting at 1
Debug: [GIB] Gibsons found: 0
Debug: [GIB] PairAllGibsons(4,-1,2,2)
Debug: [GIB] Gibson-equivalent ranks: 1 starting at 1
Debug: [GIB] Gibsons found: 0
Division A Round 3 Pairings

Board Players
   1  Chew, John (A1) vs. Chew, Liam (A4).
   2  Chew, Kristen (A2) vs. Chew, Jamie (A3).
Debug: [GIB] PairAllGibsons(4,-1,1,2)
Debug: [GIB] Gibson-equivalent ranks: 1 starting at 1
Debug: [GIB] Gibsons found: 0
Debug: [GIB] PairAllGibsons(4,-1,1,2)
Debug: [GIB] Gibson-equivalent ranks: 1 starting at 1
Debug: [GIB] Gibsons found: 0
Debug: [GIB] PairAllGibsons(4,2,1,2)
Debug: [GIB] Gibson-equivalent ranks: 1 starting at 1
Debug: [GIB] Gibsons found: 1
Debug: [GIB] 1 gibson.
Debug: [GIB] Pairing one gibson from 4 players, lpr=2.
Debug: [GIB]   1=>  1  4.0 +850 Player, A #1
Debug: [GIB]   2=>  2  2.0  +51 Player, B #2
Debug: [GIB]   3=>  2  2.0  +50 Player, D #4
Debug: [GIB]   4=>  2  2.0  +49 Player, C #3
Debug: [GIB] ... victim (rep=1) = Player, C (B3)
Debug: [GIB] Gibson-equivalent ranks: 1 starting at 2
Debug: [GIB] Gibsons found: 0
Division B Round 3 Ratings

Rnk Won-Lost Spread OldR NewR +-R Player         Last        
  1 3.0-0.0   +600  1900 1912 +12 Player, A (B1) W:400-300:B2
  2 1.0-2.0   -199  1800 1785 -15 Player, B (B2) L:300-400:B1
  3 1.0-2.0   -200  1600 1605  +5 Player, D (B4) L:100-200:B3
  4 1.0-2.0   -201  1700 1695  -5 Player, C (B3) W:200-100:B4
Division B Round 4 Pairings

Board Players
   1  Player, A (B1) vs. Player, C (B3).
   2  Player, B (B2) vs. Player, D (B4).
#endstdout
#beginstderr
Error: Pairings failed. [epfail]
Error: You cannot compute pairings for Round 5 because config max_rounds = 4. [ebigrd]
#endstderr
#endtest
