view release on metacpan or search on metacpan
lib/Fuse/PerlSSH/FS.pm view on Meta::CPAN
Keep in mind that even when the underlying filesystem on the remote end has everything in
place for extended attribs, your local stack might be incomplete. As of this writing,
FUSE implementations on NetBSD and FreeBSD do not support xattr, for example.
=head2 No keep-alive
Currently, there's no keep-alive mechanism and the automatic reconnect generally fails.
So the mount might become unresponsive after a certain time of inactivity.
=head1 SEE ALSO
L<FUSE|Fuse>, L<IPC::PerlSSH>. L<Filesys::Virtual::SSH>.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/FusionInventory/Agent/HTTP/Client.pm view on Meta::CPAN
$self->{ua} = LWP::UserAgent->new(
requests_redirectable => ['POST', 'GET', 'HEAD'],
agent => $FusionInventory::Agent::AGENT_STRING,
timeout => $params{timeout} || 180,
parse_head => 0, # No need to parse HTML
keep_alive => 1,
);
if ($params{proxy}) {
$self->{ua}->proxy(['http', 'https'], $params{proxy});
} else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Future/Batch/XS.xs view on Meta::CPAN
/* Run the batch - fully in XS! */
run_loop(aTHX_ state_sv);
RETVAL = newSVsv(state->result_future);
/* Don't dec state_sv - callbacks hold copies that keep it alive */
/* It will be freed when all callbacks complete and are GC'd */
}
OUTPUT:
RETVAL
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Future/Uring.pm view on Meta::CPAN
=head2 nop
await Future::Uring::nop(%options);
This will do absolutely nothing. This can be useful though if you want to run some code after submissions have been made or need to keep something alive until that point.
=head2 open
my $handle = await Future::Uring::open($filename, $mode = '<', %options);
view all matches for this distribution
view release on metacpan or search on metacpan
t/04-wrapper.t view on Meta::CPAN
my $sub = $ctx->new_child_context();
can_ok($sub, qw/get_type new_child_context/);
$ctx = undef;
is exception { $sub->get_type(GCC_JIT_TYPE_INT) }, undef, "subcontext is alive when parent is out of scope";
is exception { $volatile->as_object }, undef, "subcontext keeps parent's objects alive";
$sub = undef;
like exception { $volatile->as_object }, qr/this type is no longer usable/, "when all contexts are destroyed, objects become invalid";
view all matches for this distribution
view release on metacpan or search on metacpan
it and/or modify it under the same terms as Perl itself.
=head2 Acknowledgements
Thanks to Steve Bonds for releasing Chart::PNGgraph, and keeping the
code alive when GD reached version 1.20, and I didn't have time to do
something about it.
Thanks to the following people for contributing code, or sending me
fixes:
Dave Belcher,
view all matches for this distribution
view release on metacpan or search on metacpan
examples/async1.pl view on Meta::CPAN
});
my $p = $machine->async( hi => 1..4 );
# GRID::Machine::Process objects are overloaded
print "Doing something while $p is still alive ...\n" if $p;
my $r = $machine->waitall();
print "Result from process '$p': ",Dumper($r),"\n";
print "GRID::Machine::Process::Result objects are overloaded in a string context:\n$r\n";
view all matches for this distribution
view release on metacpan or search on metacpan
bin/wsutil.pl view on Meta::CPAN
-p use POST instead of GET
--post This is a boolean field and does not require an argument.
-k enable keepalives
--keepalive This is a boolean field and does not require an argument.
-o pass raw output from the service instead of trying to
--raw decode it as json This is a boolean field and does not
require an argument.
bin/wsutil.pl view on Meta::CPAN
my $args;
my $username;
my $realm;
my $timeout;
my $usePost;
my $use_keep_alive;
my $raw_output;
my $cookies_location;
my $service_cache_file;
my $name_services;
my $suppress_output;
bin/wsutil.pl view on Meta::CPAN
'u|username=s' => \$username,
'P|password=s' => \$password,
'r|realm=s' => \$realm,
't|timeout=i' => \$timeout,
'p|post' => \$usePost,
'k|keepalive' => \$use_keep_alive,
'o|raw' => \$raw_output,
'l|cookiejar=s' => \$cookies_location,
'c|servicecache=s' => \$service_cache_file,
'n|nameservice=s' => \$name_services,
'X|noresponse' => \$suppress_output,
bin/wsutil.pl view on Meta::CPAN
'uid' => $username,
'passwd' => $password,
'realm' => $realm,
'timeout' => $timeout,
'usePost' => $usePost,
'use_keep_alive' => $use_keep_alive,
'raw_output' => $raw_output,
'cookieJar' => HTTP::Cookies->new(
'file' => $cookies_location,
'autosave' => 1,
'ignore_discard' => 1,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/GSM/SMS/NBS/Stack.pm view on Meta::CPAN
$VERSION = "0.161";
# $__NBSSTACK_PRINT++;
# Keep the packets alive for 1 day
$__TIME_TO_LIVE = 60*60*24;
# Constructor
sub new {
my $proto = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
ChangeLog.pre-git view on Meta::CPAN
* t/GstClock.t, t/GstElement.t: Use alsasink instead of alsasrc
for the clock tests. Skip some tests that I'm unable to fix at
the moment.
* xs/GstClock.xs (gst2perl_clock_callback): Ref the clock id to
keep it alive. This should make GStreamer::Clock::wait_async work
correctly.
2006/01/29 kaffeetisch
* GStreamer.pm, NEWS: Release 0.06.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Game/Battleship.pm view on Meta::CPAN
}
}
}
# Do we have a winner?
my @alive = grep { $self->{players}{$_}->life } keys %{ $self->{players} };
$winner = @alive == 1 ? shift @alive : undef;
}
#warn $winner->name ." is the winner!\n";
return $winner;
}
lib/Game/Battleship.pm view on Meta::CPAN
=head2 play
$winner = $g->play;
Take a turn for each player, striking all the opponents, until there
is only one player left alive.
Return the C<Game::Battleship::Player> object that is the game
winner.
=head1 TO DO
view all matches for this distribution
view release on metacpan or search on metacpan
eg/rhythm.pl view on Meta::CPAN
my @events;
my $out_file = shift // 'out.midi';
class Timer {
field $name :param :reader = "none";
field $alive :reader = 1;
field $callback :param :writer;
field $energy :param = 96;
field $cur_energy = 0;
field $start :param = 0;
field $priority :param :reader = 0;
eg/rhythm.pl view on Meta::CPAN
unless ( $stash->{advanced} ) {
$dtime = $value;
$stash->{advanced} = 1;
}
my $spawn = $callback->( $dtime, $channel, $pitch, $velocity );
$alive = 0 if --$ttl <= 0;
$start = 0;
# when we're next scheduled to run (if still alive)
return defined $spawn ? ( $energy, $spawn ) : $energy;
}
}
# Create a note_on event, and schedule a note_off for later.
eg/rhythm.pl view on Meta::CPAN
}
my $cost;
do {
$cost = Game::EnergyLoop::update( \@objects, \&reorder, $stash );
@objects = grep { $_->alive } @objects;
$stash->{advanced} = 0;
} while ( $cost < ~0 );
sub make_tracks () { [ MIDI::Track->new( { events => \@events } ) ] }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Game/Entities.pm view on Meta::CPAN
sub created ($self) { scalar @{ $self->{entities} } - 1 }
# Get the number of created entities that are still valid; that is, that have
# not been deleted.
sub alive ($self) {
my $size = @{ $self->{entities} } - 1;
my $current = $self->{available};
until ( $current->$is_null ) {
$size--;
view all matches for this distribution
view release on metacpan or search on metacpan
share/hex-describe-johnston-table.txt view on Meta::CPAN
1,The extreme humidity of the *[name for jungle]* makes breathing difficult, but has the added benefit of disabling most robots.
1,The *[name for jungle]* seems to be extra hostile today. Swaying [colour] vines grab at your arms and legs.
1,The *[name for jungle]* is thick with [colour] vegetation and surprisingly unyielding.
1,The rain is unceasing as you stumble your way through the *[name for jungle]*. The trail is slowly being eroded away.
1,The [colour] under and overgrowth are heavy tangled in the *[name for jungle]*.
1,The *[name for jungle]* is alive with animal grunts and growls which are nearly deafening and definitely terrifying.
1,There are sudden cliffs and precarious paths hiddden by choking, thorny vines in the *[name for jungle]*.
1,The triple canopies in the *[name for jungle]* have trapped almost all of the heat and humidity close to the ground making it feel like a madman's greenhouse.
1,The *[name for jungle]* seems to be alive and waiting for you to let down your guard.
1,[capitalize colour] dew drips unceasingly from all species of foliage in the *[name for jungle]*.
;swamp
1,The foul smelling quicksand of the *[name for swamp]* pulls at your feet as you trudge along.
1,The tidal quicksand of the *[name for swamp]* ebbs and flows, and you feel yourself sinking in deeper and deeper.
share/hex-describe-johnston-table.txt view on Meta::CPAN
1,The Necromagisters
;settlement mission
1,All is quiet here.
1,The people really donât like outsiders disturbing the delicate power balance.
1,Currently, [marshal|sheriff|boss] *[here human fancy name as sheriff]* is in the area, looking for a fugitive. âIâm looking for *[nearby wanted criminal]*. [Do me a favour and let me know if you find them|Iâll reward you if you lead me to the...
# Caves
;cave people
1,The [1d6x10] **morlocks** ([morlock stats]) living in these caves have no access to the deeper levels. All they seek is shelter from the elements and a defensible home. At night, they emerge from the underground to do their hunting and gathering. [...
share/hex-describe-johnston-table.txt view on Meta::CPAN
;physical mutations explained
1,<h2>Physical Mutations</h2><dl><dt>Acid Touch<dd>The mutant can convey a strong acid by touch. The acid will do 1d10 damage for 3 rounds.<dt>Cat Eyes<dd>The mutant is able to see in complete darkness as if it were daylight.<dt>Chameleon<dd>The muta...
;mental mutations explained
1,<h2>Mental Mutations</h2><dl><dt>Animal Friendship<dd>The mutant is friendly to all animals and animaloids.<dt>Animal Telepathy<dd>The mutant can communicate with all animals and animaloids up to 25 meters.<dt>Blur<dd>The mutant is just a blur for ...
;plant mutations explained
1,<h2>Plant Mutations</h2><dl><dt>Accumulated Resistance<dd>The plant gains immunity to cold, electric, energy, heat, or radiation attacks after 1 round.<dt>Acid Sap<dd>The plant conveys an acidic sap on contact which does 3d6 damage.<dt>Animal Telep...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Game/Life/Faster.pm view on Meta::CPAN
initial population, and then the rules are iterated. In each iteration
cells change state based on their current state and how many of the 8
adjacent cells (orthogonally or diagonally) are "living".
In Conway's original formulation, the rules were that a "dead" cell
becomes alive if it has exactly two living neighbors, and a "living"
cell becomes "dead" unless it has two or three living neighbors.
This implementation was inspired by L<Game::Life|Game::Life>, and is
intended to be reasonably compatible with its API. But the internals
have been tweaked in a number of ways in order to get better
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Game/Life/Infinite/Board.pm view on Meta::CPAN
=head2 C<updateCell>
C<< $board->updateCell($x,$y,$state); >>
Set the state of the cell with coordinates $x,$y to $state, where $state can be 0 (dead) or 1..4 (alive). Standard rules board (not colored) can only use 1 for alive cell. Immigration board can only use 1 or 2.
=head2 C<loadInit>
C<< $board->loadInit($filename) >>
view all matches for this distribution
view release on metacpan or search on metacpan
=head1 DESCRIPTION
Conway's Game of Life is a basic example of finding 'living' patterns
in rather basic rulesets (see B<NOTES>). The Game of Life takes
place on a 2-D rectangular grid, with each grid point being either
alive or dead. If a living grid point has 2 or 3 neighbors within the
surrounding 8 points, the point will remain alive in the next
generation; any fewer or more will kill it. A dead grid point will
become alive if there are exactly 3 living neighbors to it. With
these simple rules, fascinating structures such as gliders that move
across the grid, glider guns that generate these gliders, XOR gates,
and others have been found.
This module simply provides a way to simulate the Game of Life in Perl.
=item C<place_text_points>
Takes two scalars (indicated the position on the grid), a character,
and an array of strings; as with C<place_points>, this array will
be placed into the grid at the specified position. The character indicates
what cells are to be considered as alive; any other character in the
string will be considered dead. Thus, the example given in the B<SYNOPSIS>
can be writen optionally as
my @starting = qw( XXX
X..
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Game/WordBrain/WordList.pm view on Meta::CPAN
alitrunk
aliturgic
aliturgical
ality
aliunde
alive
aliveness
alives
alivincular
aliya
aliyah
aliyahaliyahs
aliyas
lib/Game/WordBrain/WordList.pm view on Meta::CPAN
calisayas
calistheneum
calisthenic
calisthenical
calisthenics
caliver
calix
calixtin
calk
calkage
calked
lib/Game/WordBrain/WordList.pm view on Meta::CPAN
cantador
cantala
cantalas
cantalever
cantalite
cantaliver
cantaloup
cantaloupe
cantaloupes
cantando
cantankerous
lib/Game/WordBrain/WordList.pm view on Meta::CPAN
realisticize
realisticness
realists
realities
reality
realive
realizability
realizable
realizableness
realizably
realization
lib/Game/WordBrain/WordList.pm view on Meta::CPAN
unaligned
unalike
unalimentary
unalimentative
unalist
unalive
unallayable
unallayably
unallayed
unalleged
unallegedly
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/AIBots.pm view on Meta::CPAN
$bot->{'cloak'} = 0;
}
}
sub tick_check {
my (%alive, $hasfuel, $missiles);
return if !$Running;
foreach my $bot (@Bots) {
$alive{$bot->{'team'} || bot_id($bot)}++ unless $bot->{'dead'};
$hasfuel++ unless $bot->{'dead'} or $bot->{'fuel'} <= 0;
foreach my $missile (@{$bot->{'missiles'}}) {
$missiles++ unless $missile->{'dead'};
}
}
if (!$missiles and (scalar keys(%alive) <= 1) or !$hasfuel) {
# Game Over
display('end');
my %TScore;
foreach my $bot (@Bots) {
$bot->{'score'} += 50 * $bot->{'life'};
$bot->{'score'} -= $bot->{'burn'};
$bot->{'score'} += 500 / $alive{$bot->{'team'} || bot_id($bot)}
unless $bot->{'dead'} or (scalar keys(%alive) > 1);
$TScore{$bot->{'team'} || bot_id($bot)} += $bot->{'score'} || 0;
$bot->{'lastcmd'} = '**End**';
}
my @BScore = sort {$b->{'score'} <=> $a->{'score'}} @Bots;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/Axmud/Cmd.pm view on Meta::CPAN
'This command can only be used when the Status task is running and when there\'s'
. ' a current character profile',
);
}
if ($status eq '-a' || $status eq 'alive') {
$session->currentChar->ivPoke('lifeStatus', 'alive');
} elsif ($status eq '-s' || $status eq 'sleep') {
$session->currentChar->ivPoke('lifeStatus', 'sleep');
} elsif ($status eq '-p' || $status eq 'passout') {
$session->currentChar->ivPoke('lifeStatus', 'passout');
} elsif ($status eq '-d' || $status eq 'dead') {
$session->currentChar->ivPoke('lifeStatus', 'dead');
} else {
return $self->error(
$session, $inputString,
'Invalid life status (try -a -s -p -d / alive sleep passout dead)',
);
}
# Tell the Status task that its task window must be updated with a new background colour
$session->statusTask->set_lifeStatusChangeFlag();
view all matches for this distribution
view release on metacpan or search on metacpan
if($stderr) {
diag( "\$^X = $^X");
diag( "STDERR = $stderr");
}
pass 'Are we still alive? Checking for segfaults';
done_testing();
view all matches for this distribution
view release on metacpan or search on metacpan
t/patterns.txt view on Meta::CPAN
1|2|3|4|4|6|7|8|9|6|5|12:Stubblefield|
1|2|3|4|4|6|7|8|9|6|5|12|13:Stubblefields|
1|2|3|4|4|6|7|8|9|6|7:challenging|
1|2|3|4|4|6|7|8|9|7|11:shuttlecock|
1|2|3|4|4|6|7|8|9|8:chubbiness|
1|2|3|4|5:Aaron|Abner|Abram|Acton|Adair|Adams|Adler|Aesop|Agnes|Agnew|Agway|Aides|Aiken|Ainus|Aires|Akers|Akron|Alamo|Alcoa|Alden|Aleck|Aleut|Alger|Alice|Alsop|Alton|Altos|Alvin|Amiga|Ampex|Andes|Andre|Angie|Anglo|Angus|Anita|April|Arabs|Araby|Arden|...
1|2|3|4|5|1:agenda|alumna|amoeba|anemia|asthma|cognac|cosmic|damned|danced|darned|darted|dashed|dawned|demand|devoid|dialed|dished|docked|downed|draped|ducked|dumped|dusted|edible|elapse|empire|enable|encode|encore|endure|enrage|ensure|entice|entire|...
1|2|3|4|5|1|1:escapee|sadness|shyness|surpass|
1|2|3|4|5|1|1|2:escapees|
1|2|3|4|5|1|1|5|9|10:submission|submissive|
1|2|3|4|5|1|1|5|9|10|1:submissions|
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/Euchre/Trick.pm view on Meta::CPAN
Games::Euchre::Trick - Trick class for Euchre card game
=head1 DESCRIPTION
Only one Trick instance is alive at one time per Euchre game. The
Trick keeps track of which cards have been played, and provides useful
functions to determine which cards are legal plays, as well as who
is the winner of the trick. The trick class makes the determination
of which card beats which card, given the current trump and lead. The
trick class knows how to handle an alone hand and it calls the
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/EveOnline/API.pm view on Meta::CPAN
=head2 ua
The underlying L<LWP::UserAgent> object. Default to a new one
with no special arguments. Override this if you want to, for
example, enable keepalive or an HTTP proxy.
=cut
has user_id => (is=>'ro', isa=>Int );
has api_key => (is=>'ro', isa=>Str );
view all matches for this distribution
view release on metacpan or search on metacpan
t/res/quicklook.xml view on Meta::CPAN
<expires>2014-03-21</expires>
<reported_time>12-20 23:42:29</reported_time>
</order><order id="3311654591">
<region>10000013</region>
<station>61000089</station>
<station_name>YM-SRU VIII - Jigsaw is alive</station_name>
<security>-0.8</security>
<range>32767</range>
<price>5.25</price>
<vol_remain>2611203</vol_remain>
<min_volume>1</min_volume>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/Go/Cinderblock/Scorable.pm view on Meta::CPAN
isa => 'Games::Go::Cinderblock::State',
is => 'ro', #shouldn't change.
required => 1,
);
has _alive => (
isa => 'HashRef[Games::Go::Cinderblock::NodeSet]',
is => 'ro',
lazy => 1,
builder => '_initially_generous_with_life',
);
lib/Games/Go/Cinderblock/Scorable.pm view on Meta::CPAN
builder => '_initial_dame',
);
#has _seki => (); #
#based on state, has dame, derived, & alive. that is everything initially.
#this is an attribute so we can initialize these 3 categories at the same time, if needed.
has _initial_cats => (
is => 'ro',
isa => 'HashRef', #dame isn't color-separated; the others are.
lazy => 1,
lib/Games/Go/Cinderblock/Scorable.pm view on Meta::CPAN
my $self = shift;
my $remaining_nodes = $self->rulemap->all_nodes_nodeset;
my %initial_cats = (
dame => $self->rulemap->nodeset,
alive => {
w => $self->rulemap->nodeset,
b => $self->rulemap->nodeset,
},
derived_terr => {
w => $self->rulemap->nodeset,
lib/Games/Go/Cinderblock/Scorable.pm view on Meta::CPAN
my $stone = $self->state->at_node($node);
if($stone){
my $cond = sub{ $_ eq $stone};
my $contiguous = $self->state->floodfill ($cond, $node);
$remaining_nodes->remove($contiguous);
$initial_cats{alive}{$stone}->add($contiguous);
}
else { #space.
my $cond = sub{ ! $_ };
my $contiguous = $self->state->floodfill ($cond, $node);
my $adjacent = $contiguous->adjacent;
lib/Games/Go/Cinderblock/Scorable.pm view on Meta::CPAN
my $self = shift;
return $self->_initial_cats->{derived_terr}
}
sub _initially_generous_with_life{
my $self = shift;
return $self->_initial_cats->{alive}
}
sub _empty_nodesets{
my $self = shift;
return {
b => $self->rulemap->nodeset,
w => $self->rulemap->nodeset,
};
}
# return undef if unoccupied
# return 0 if dead, 1 if alive
sub node_animated{
my ($self,$node) = @_;
my $stone = $self->state->at_node($node);
return undef unless $stone;
return 0 if $self->_dead->{$stone} -> has_node($node);
return 1 if $self->_alive->{$stone} -> has_node($node);
Carp::confess;
}
#transanimation -- to toggle the status of life/death, reanimate^deanimate
#nop if not occupied.
lib/Games/Go/Cinderblock/Scorable.pm view on Meta::CPAN
}
else{
return $self->reanimate($node);
}
};
sub reanimate{ #dead -> alive
my ($self,$node) = @_;
my $stone = $self->state->at_node($node);
die "no stone at @$node..." unless $stone;
return 0 if $self->node_animated($node);
my $bounded_color = ($stone eq 'w') ? 'b' : 'w';
my $new_ambiguous_space = $self->state->floodfill(sub{$_ ne $bounded_color}, $node);
my $new_alives = $self->state->grep_nodeset(sub{$_ eq $stone}, $new_ambiguous_space);
$new_ambiguous_space->remove($new_alives);
#first, put stones from dead category into alive
$self->_dead->{$stone} -> remove ($new_alives);
$self->_alive->{$stone} -> add ($new_alives);
#put each seperate contiguous region of empty space in either 'dame' or 'derived_terr'
my @amb_spaces = $new_ambiguous_space->disjoint_split;
for my $space(@amb_spaces){
$self->_known_terr->{$bounded_color}->remove($space);
lib/Games/Go/Cinderblock/Scorable.pm view on Meta::CPAN
}
}
return 1;
}
sub deanimate{ #alive -> dead
my ($self,$node) = @_;
my $stone = $self->state->at_node($node);
die "no stone at @$node..." unless $stone;
return 0 unless $self->node_animated($node);
lib/Games/Go/Cinderblock/Scorable.pm view on Meta::CPAN
$self->_derived_terr->{w}->remove($new_known_terr);
$self->_derived_terr->{b}->remove($new_known_terr);
$self->_dame->remove($new_known_terr);
$self->_known_terr->{$bounded_color}->add($new_known_terr);
#same for stones: alive -> dead category
$self->_alive->{$stone}->remove($new_deads);
$self->_dead->{$stone}->add($new_deads);
return 1
}
lib/Games/Go/Cinderblock/Scorable.pm view on Meta::CPAN
=head2 Stone-occupied node categories:
=over 4
=item alive
The initial state.
=item dead
A scorable must be told what stones are dead.
=item seki?
not implemented. Maybe the stones are alive in seki? dunno how to mark seki.
=back
=head2 stoneless node categories:
=over 4
=item known_territory
considering stones that are known to be dead, this area is known to be alive.
=item derived_territory
Surrounded by stones that may be deanimated.
lib/Games/Go/Cinderblock/Scorable.pm view on Meta::CPAN
I think that this covers all categories related to score negotiation
for different scoring regimes.
=over 4
=item chinese rules -- alive stones are a point each.
=item japanese rules -- no territory in seki.
=back
lib/Games/Go/Cinderblock/Scorable.pm view on Meta::CPAN
=over 4
=item deanimate -- To set as dead, to kill
=item reanimate -- To set as alive, to revive
=item animation -- the life/death state of a stone, chain, group, or any (in)?animate object
=item transanimate -- to animate xor deanimate something, to to toggle the life/death state
lib/Games/Go/Cinderblock/Scorable.pm view on Meta::CPAN
=head2 dead ($color)
Returns a nodeset of stone of $color, which have been deanimated
=head2 alive ($color)
Returns a nodeset of nodes with stones of $color, which have not been deanimated.
Alive is the default state.
=head2 deanimate($node)
lib/Games/Go/Cinderblock/Scorable.pm view on Meta::CPAN
Empty regions are initially either dame or derived territory.
marking a stone as dead has the effect of converting dame/derived to known
for the region bounded by stones of the opposite color.
reanimating dead stones returns its adjacent empty nodes to dame.
alive stones adjacent to known territory can not be deanimated.
=head1 REPRESENTATION
Each category has a hash attribute in the scorable object.
they are divided into colors, where each color of that cat has a B::NodeSet.
the cats are named _alive, _dead, _known_terr, _derived_terr, _dame, maybe _seki later.
each transanimation initiates a floodfill to discover the boundry of its the region
bordered by the opposite color.
The dame category is an exception. there is no color specified.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/Go/GTP.pm view on Meta::CPAN
sub final_status_list {
my ($statustype, $referee, $player) = @_;
my $pref;
for ($statustype) {
if (lc $_ eq 'alive') {
$pref = $referee->listallalive;
last
}
if (lc $_ eq 'dead') {
$pref = $referee->listalldead;
last
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/Go/Referee.pm view on Meta::CPAN
}
# list all the live stones of a particular colour
# (as the set of all blocks adjacent to their opponent's illegal moves)
sub listalive {
my ($self, $colour) = @_;
# turn off alternation and passcount errors temporarily
$self->{_const}{passcount} = 0;
$self->{_const}{alternation} = 0;
lib/Games/Go/Referee.pm view on Meta::CPAN
$self->{_const}{alternation} = 1;
return $points
}
# list the dead stones of a particular colour
# (as the difference between their alive list
# and their total list)
sub listdead {
my ($self, $colour) = @_;
my $allref = liststones($self, $colour);
my $aliveref = listalive($self, $colour);
my @dead = ();
for (keys %$allref) {
push @dead, $_ unless exists $aliveref->{$_};
}
@dead = map {
/(.*),(.*)/;
insertpoints($self, $1, $2)
} @dead;
view all matches for this distribution
view release on metacpan or search on metacpan
sgf/redrose-tartrate.sgf view on Meta::CPAN
summer [2d\]: b is being nice
flop [6k?\]: not at all
Tictactoe [-\]: yes black holds hanami
Jigosaku [2k\]: seems b can hjust close up here
Rakshasa [3k\]: artemis: n18-o17-p16-n19-m19-o19-m18-n16-m16-o16
flop [6k?\]: flowery, b is not alive yet
transcend [9k\]: Why didnt black just play 01 instead of P3?
sita [2d\]: not really flower viewing, the ko
danoontje [6d\]: not quite, b is almost dead too
comboy [11k\]: wow, who is tartrate ?? I just looked at his stats
Dicey [13k\]: yeh
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/Go/Sgf2Dg.pm view on Meta::CPAN
$depth++;
if (HasLibs($x + 1, $y, $color, $been_here, $depth) or
HasLibs($x - 1, $y, $color, $been_here, $depth) or
HasLibs($x, $y + 1, $color, $been_here, $depth) or
HasLibs($x, $y - 1, $color, $been_here, $depth)) {
return(1); # yes! we're alive!
}
return(0); # uh-oh! no liberties yet...
}
sub RemoveGroup {
view all matches for this distribution