Games-Go-Image2SGF
view release on metacpan or search on metacpan
Image2SGF.pm view on Meta::CPAN
344345346347348349350351352353354355356357358359360361362363
my
$time
=
scalar
localtime
;
$self
->{sgf} .=
<<ENDSTARTSGF;
(;GM[1]FF[4]SZ[19]
GN[Image2SGF conversion of $time.]
AP[Image2SGF by Chris Ball.]
PL[B]
ENDSTARTSGF
}
sub
update_sgf {
my
$self
=
shift
;
my
(
$stone
,
$x
,
$y
) =
@_
;
if
(
$stone
== BLACK) {
push
@{
$self
->{blackstones}},
"$y$x"
;
}
elsif
(
$stone
== WHITE) {
push
@{
$self
->{whitestones}},
"$y$x"
;
}
}
( run in 1.359 second using v1.01-cache-2.11-cpan-49f99fa48dc )