2013-04-15 02:18:05 -07:00
|
|
|
BEGIN {
|
|
|
|
FS = "\t"
|
|
|
|
}
|
|
|
|
|
2013-04-15 19:59:31 -07:00
|
|
|
function genName() {
|
2013-04-15 19:51:28 -07:00
|
|
|
name = "UNKNOWN"
|
|
|
|
if ($0 ~ /MMAB/) {
|
|
|
|
name = "MMAB"
|
|
|
|
} else if ($0 ~ /VEGAS/) {
|
|
|
|
name = "VEGAS"
|
2013-05-10 18:37:45 -07:00
|
|
|
} else if ($0 ~ /MCTS2/) {
|
|
|
|
name = "MCTS2"
|
2013-04-15 19:51:28 -07:00
|
|
|
} else if ($0 ~ /MCTS/) {
|
|
|
|
name = "MCTS"
|
|
|
|
}
|
|
|
|
|
|
|
|
cheat = "?"
|
|
|
|
if ($0 ~ /cheat=true/) {
|
|
|
|
cheat = "C"
|
|
|
|
} else if ($0 ~ /cheat=false/) {
|
|
|
|
cheat = "H"
|
|
|
|
}
|
|
|
|
|
2013-04-15 19:59:31 -07:00
|
|
|
return name "-" cheat
|
2013-04-15 19:51:28 -07:00
|
|
|
}
|
|
|
|
|
2013-04-15 19:59:31 -07:00
|
|
|
/index=0/ {
|
|
|
|
ai1 = genName()
|
|
|
|
}
|
2013-04-15 19:51:28 -07:00
|
|
|
|
2013-04-15 19:59:31 -07:00
|
|
|
/index=1/ {
|
|
|
|
ai2 = genName()
|
2013-04-15 19:51:28 -07:00
|
|
|
}
|
|
|
|
|
2013-04-15 02:18:05 -07:00
|
|
|
/Saved Player/ {
|
|
|
|
getline
|
|
|
|
getline
|
|
|
|
|
|
|
|
if ($8 == "0") {
|
|
|
|
C = "W"
|
|
|
|
} else {
|
|
|
|
C = "B"
|
|
|
|
}
|
2013-04-15 19:51:28 -07:00
|
|
|
print ai1 "-" $3 " " ai2 "-" $6 " " C
|
2013-04-15 02:18:05 -07:00
|
|
|
}
|