repo.or.cz
/
pachi.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
ladder: use undo
[pachi.git]
/
t-unit
/
to_new_format
blob
eb1bed561eb07b76f9870d60620a602fdbb6c6b0
1
#!/usr/bin/perl
2
# Usage: to_new_format < sar.t
3
# convert sar.t from old format to new format (spaces between stones)
4
5
foreach
my
$str
(<
STDIN
>)
6
{
7
if
(
$str
=~
m/^[.XO]+$/
)
8
{
$str
=~
s/([.XO])/$1 /g
;
9
$str
=~
s/ $//
;
10
}
11
print
$str
;
12
}