view release on metacpan or search on metacpan
examples/v201309/basic_operations/update_ad_group.pl view on Meta::CPAN
# Replace with valid values of your account.
my $ad_group_id = "INSERT_AD_GROUP_ID_HERE";
# Example main subroutine.
sub update_ad_group {
my $client = shift;
my $ad_group_id = shift;
# Create ad group with updated status.
my $ad_group = Google::Ads::AdWords::v201309::AdGroup->new({
view all matches for this distribution
view release on metacpan or search on metacpan
#$this->error($error) and return if !$res;
return $res;
}
sub update_trustdb { my ($this) = @_;
my ($pid,$output,$error) = start_gpg($this,$this->{'COMMAND'}.' --update-trustdb', '');
return if !$pid;
$error =~ s/^gpg: (\d+) keys processed\s*//;
my $number_processed = $1 || '0';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/GRNOC/Config.pm view on Meta::CPAN
=head2 update_node
=cut
sub update_node{
my $self = shift;
my $path = shift;
my $new_value = shift;
lib/GRNOC/Config.pm view on Meta::CPAN
=head2 update_attribute
=cut
sub update_attribute{
my $self = shift;
my $path = shift;
my $attribute_name = shift;
my $attribute_value = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
);
}
my @buttons;
sub update_locks ($) {
my $box = shift;
my $lines;
my $cv = gtm_run (
[qw/lke show -all/],
">" => \$lines,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Game/DijkstraMap.pm view on Meta::CPAN
}
}
return \@points;
}
sub update {
my $self = shift;
my $dimap = $self->dimap;
croak "dimap not set" if !defined $dimap;
my $maxrow = $dimap->$#*;
my $maxcol = $dimap->[0]->$#*;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Game/EnergyLoop.pm view on Meta::CPAN
package Game::EnergyLoop;
our $VERSION = '0.01';
use strict;
use warnings;
sub update {
my ($enlos, $initiative, $arg) = @_;
my $min = ~0;
for my $ent (@$enlos) {
my $energy = $ent->enlo_energy;
$min = $energy if $energy < $min;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Game/HeroesVsAliens/Message.pm view on Meta::CPAN
has opacity => (
is => 'rw',
default => sub { 1 }
);
sub update {
my ($self, $app) = @_;
$self->y($self->y - 0.3);
$self->life_span($self->life_span + 1);
$self->opacity($self->opacity - 0.03) if ($self->opacity > 0.03);
}
view all matches for this distribution
view release on metacpan or search on metacpan
sub turn_around ($ani) {
$ani->[ORIENT] = ( $ani->[ORIENT] + 2 ) % @headings;
}
sub update {
put_sprite( 0, 0, $bgi );
put_sprite( @gridxy, $gridi );
my $title = q{K E Z B O A R D A L P H A - L} . $level;
$font->print( $app, 16, 15, $title );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Game/LevelMap.pm view on Meta::CPAN
}
print $s;
return $self;
}
sub update_terminal {
my $self = $_[0];
my ( $col, $row ) = map int, @_[ 1 .. 2 ];
my $lm = $self->level;
my $s = '';
for my $point ( @_[ 3 .. $#_ ] ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Game/Life/Infinite/Board.pm view on Meta::CPAN
sub getColor {
my $self = shift;
return $self->{'color'};
};
sub updateCell {
# Update the state of a cell. If non-existing, create it.
my ( $self, $xpos, $ypos, $state ) = @_;
defined ($self->{'cells'}->{$xpos, $ypos}) or &createCell($self, $xpos, $ypos);
if (($self->{'cells'}->{$xpos, $ypos}->{'state'}) and (not $state)) {
my $oldstate = $self->{'cells'}->{$xpos, $ypos}->{'state'};
view all matches for this distribution
view release on metacpan or search on metacpan
my ($app) = @_;
$app->{dirty} = 1;
return NEXT_EVENT;
}
sub update {
my ($app) = @_;
if ( $app->{dirty} ) {
touchwin;
move 0, 0;
clrtobot;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Game/PlatformsOfPeril.pm view on Meta::CPAN
}
}
$Hero = [ $col, $goal ];
}
sub update_hero {
my ( $key, $ret );
tcflush( STDIN_FILENO, TCIFLUSH );
while (1) {
while (1) {
$key = ReadKey(0);
lib/Game/PlatformsOfPeril.pm view on Meta::CPAN
last if $ret != MOVE_FAILED;
}
return $ret;
}
sub update_monst {
my ($ent) = @_;
my $mcol = $ent->[LMC][WHERE][PCOL];
my $mrow = $ent->[LMC][WHERE][PROW];
# prevent monster move where only gravity should apply
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Game/Xomb.pm view on Meta::CPAN
my ($won) = @_;
my $score = loot_value() + ($won ? 10000 : 0) + 10 * int exp $Level_Max;
return "Score: $score in $Turn_Count turns (v$VERSION:$Seed)";
}
sub update_gameover {
state $count = 0;
raycast_fov(1);
tcflush(STDIN_FILENO, TCIFLUSH);
my $key = $RKFN->(\%Key_Commands);
if ($count == 4) {
lib/Game/Xomb.pm view on Meta::CPAN
}
$count++;
return MOVE_OKAY, DEFAULT_COST;
}
sub update_fungi {
my ($self) = @_;
my ($mcol, $mrow) = $self->[LMC][WHERE]->@[ PCOL, PROW ];
my ($tcol, $trow) = $Animates[HERO][LMC][WHERE]->@[ PCOL, PROW ];
my $weap = $self->[STASH][WEAPON];
lib/Game/Xomb.pm view on Meta::CPAN
}
return MOVE_OKAY, $cost;
}
sub update_ghast {
my ($self) = @_;
my ($mcol, $mrow) = $self->[LMC][WHERE]->@[ PCOL, PROW ];
my ($tcol, $trow) = $Animates[HERO][LMC][WHERE]->@[ PCOL, PROW ];
my $weap = $self->[STASH][WEAPON];
lib/Game/Xomb.pm view on Meta::CPAN
}
return MOVE_OKAY, $cost;
}
sub update_mimic {
my ($self) = @_;
my ($mcol, $mrow) = $self->[LMC][WHERE]->@[ PCOL, PROW ];
my ($tcol, $trow) = $Animates[HERO][LMC][WHERE]->@[ PCOL, PROW ];
my $weap = $self->[STASH][WEAPON];
lib/Game/Xomb.pm view on Meta::CPAN
$Violent_Sleep_Of_Reason = 1;
return MOVE_OKAY, $cost;
}
sub update_player {
my ($self) = @_;
my ($cost, $ret);
# pre-move tasks
sb_update_energy();
lib/Game/Xomb.pm view on Meta::CPAN
$Turn_Count++;
return $ret, $cost;
}
# when player is in range try to shoot them
sub update_troll {
my ($self) = @_;
my ($mcol, $mrow) = $self->[LMC][WHERE]->@[ PCOL, PROW ];
my ($tcol, $trow) = $Animates[HERO][LMC][WHERE]->@[ PCOL, PROW ];
my $weap = $self->[STASH][WEAPON];
lib/Game/Xomb.pm view on Meta::CPAN
return MOVE_OKAY, $cost;
}
# like shooter but can only fire across totally open ground. advanced
# targetting arrays prevent friendly fire and property damage
sub update_stalker {
my ($self) = @_;
my ($mcol, $mrow) = $self->[LMC][WHERE]->@[ PCOL, PROW ];
my ($tcol, $trow) = $Animates[HERO][LMC][WHERE]->@[ PCOL, PROW ];
my $weap = $self->[STASH][WEAPON];
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/2048/Animation.pm view on Meta::CPAN
my $value = $self->cur_frame / ($self->frame_count - 1);
my $range = $self->last_value - $self->first_value;
return $value * $range + $self->first_value;
}
sub update {
my $self = shift;
return if $self->cur_frame >= $self->frame_count;
$self->cur_frame($self->cur_frame + 1);
return 1;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/3D/Thingy.pm view on Meta::CPAN
$dst->add_input($link);
$link->add_input($self); # from us to link
$link;
}
sub update
{
# if thing is going from state A to state B, interpolate values based upon
# current time tick. If reached state B, disable interpolation, and send a
# signal. Return 1 if while still in transit, 0 if target state reached
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/Axmud/Buffer.pm view on Meta::CPAN
}
##################
# Methods
sub update {
# Called by GA::Session->updateDisplayBuffer when this object stores the most
# recently-displayed line of text from the world, and that line hasn't yet been terminated
# with a newline character
# Updates the stored IVs
lib/Games/Axmud/Buffer.pm view on Meta::CPAN
$self->updateModes();
return 1;
}
sub updateModes {
# Called by $self->new and $self->update
# $self->mxpModeHash stores all the MXP modes (but only those in the range 10-12, 19, 20-99)
# that apply to this line
# Update the hash
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/Checkers/SDL.pm view on Meta::CPAN
$self->{fullscreen} ^= 1;
SDL::Video::wm_toggle_fullscreen($self->{display});
}
sub update_display ($) {
my $self = shift;
SDL::Video::update_rect($self->{display}, 0, 0, 0, 0);
return 1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/Construder/Client/Frontend.pm view on Meta::CPAN
$self->{res}->{config}->{fog} eq ''
? $FOG_DEFAULT
: $self->{res}->{config}->{fog}
}
sub update_fog {
my ($self) = @_;
my $fog = $FOGS{$self->fog ()} || $FOGS{$FOG_DEFAULT};
glClearColor (@$fog);
glFogfv_p (GL_FOG_COLOR, @$fog);
}
lib/Games/Construder/Client/Frontend.pm view on Meta::CPAN
my $sbp = $self->{selected_box};
my $sbbp = $self->{selected_build_box};
$self->position_action ($sbp, $sbbp, $btn);
}
sub update_player_pos : event_cb {
my ($self, $pos) = @_;
}
sub visible_chunks_changed : event_cb {
my ($self, $new, $old, $req) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/FrogJump/Animation.pm view on Meta::CPAN
sub end {
my $self = shift;
return $self->current_frame >= $self->frame_count ? 1 : 0;
}
sub update {
my $self = shift;
my $obj = $self->obj;
my $attr = $self->attr;
my $snap_index = int($self->current_frame / $self->snapshot_frame_count);
$obj->$attr($self->snapshot->[$snap_index]) if $snap_index < @{$self->snapshot};
view all matches for this distribution
view release on metacpan or search on metacpan
bin/frozen-bubble view on Meta::CPAN
}
}
}
#- extract it from "handle_graphics" to optimize a bit animations
sub update_malus($$) {
my ($fun, $p) = @_;
my $malus_nb = @{$pdata{$p}{malus}};
my $y_shift = 0;
while ($malus_nb > 0) {
my $print = sub($) {
bin/frozen-bubble view on Meta::CPAN
mp_disconnect_with_reason('', '', '', '', loc("Lost connection to server!"), '', loc("Your lag is probably too high."));
}
}
}
sub update_say_mp {
put_image($imgbin{void_chat}, $POS{p1}{chatting}{x}, $POS{p1}{chatting}{'y'});
callback_entry('print', { xpos => $POS{p1}{chatting}{x} + 15, ypos => $POS{p1}{chatting}{'y'} + 5, font => 'ingame_chat', maxlen => $imgbin{void_chat}->w - 30 });
push @update_rects, $apprects{main};
}
bin/frozen-bubble view on Meta::CPAN
$pdata{$player}{hurry_save_img} and
switch_image_on_background($pdata{$player}{hurry_save_img}, $POS{$player}{left_limit} + $POS{$player}{hurry}{x}, $POS{$player}{hurry}{'y'});
$pdata{$player}{hurry_save_img} = undef;
}
sub update_lost {
my ($player) = @_;
return if odd($frame);
if (@{$sticked_bubbles{$player}}) {
bin/frozen-bubble view on Meta::CPAN
print_('menu', $app, $MENUPOS{xpos_panel}, $MENUPOS{ypos_panel} + 30, loc("Draw game!"), $imgbin{void_panel}->w - 20, 'center');
SDL::Video::update_rect($app, 0, 0, 0, 0);
}
}
sub update_won {
my ($player) = @_;
return if odd($frame);
iter_players { #- need iter_players to get the small graphics change for free if we're in multiplayer
bin/frozen-bubble view on Meta::CPAN
}
}
#- ----------- mainloop helper --------------------------------------------
sub update_game() {
if ($pdata{state} eq 'game') {
handle_game_events();
iter_players {
if ($pdata{$::p}{state} eq 'lost') {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/Go/AGA/TDListDB.pm view on Meta::CPAN
'next_tmp_id',
' ) VALUES ( 1, 0, 1 )',
);
}
sub update_time {
my ($self, $new) = @_;
if (@_ > 1) {
$self->sth('update_time')->execute($new);
}
lib/Games/Go/AGA/TDListDB.pm view on Meta::CPAN
$reaped++ if ($kid > 0);
} while $kid > 0;
return $reaped;
}
sub update_from_AGA {
my ($self) = @_;
my $pid;
if ($self->background) {
$pid = fork;
lib/Games/Go/AGA/TDListDB.pm view on Meta::CPAN
$self->update_from_file($fname);
exit if (defined $pid); # exit if this is a spawned child ($pid == 0)
}
sub update_from_file {
my ($self, $fh) = @_;
if (not ref $fh) {
my $fname = $fh;
$fh = undef;
view all matches for this distribution
view release on metacpan or search on metacpan
Image2SGF.pm view on Meta::CPAN
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";
}
view all matches for this distribution
view release on metacpan or search on metacpan
SimpleBoard.pm view on Meta::CPAN
9 => [qw(0,2 2,0 0,0 2,2 0,1 2,1 1,0 1,2 1,1)],
);
our $mark_symbols = MARK_CIRCLE | MARK_SQUARE | MARK_TRIANGLE | MARK_CROSS | MARK_KO;
sub update {
my ($self, $path) = @_;
my $board = $self->{board};
for (@$path) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/Irrlicht.pm view on Meta::CPAN
{
my $self = shift;
$self->{_app}->{depth};
}
#sub update
# {
# my $self = shift;
# $self->{_app}->{app}->update(@_);
# }
view all matches for this distribution
view release on metacpan or search on metacpan
examples/glyphinator.pl view on Meta::CPAN
}
return @results;
}
sub update_last_sent {
my ($x, $y) = @_;
my $r = $star_db->do(q{update orbitals set last_excavated = datetime(?,'unixepoch') where x = ? and y = ?}, {}, time(), $x, $y);
unless ($r > 0) {
diag("Warning: could not update orbitals table for body at $x, $y!\n");
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/Minesweeper.pm view on Meta::CPAN
sub start_timer () {
$timer = 0;
$watcher = AnyEvent->timer (after => 1.0, interval => 1, cb => sub { timeout; });
}
sub update_mine_count() {
$mc->set_text ( sprintf " %.3d", $mine_count);
}
sub expose_cb {
my ($w, $e) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/Nonogram/Clue.pm view on Meta::CPAN
}
}
return $hit ? $hit : 0;
}
sub update {
my ($self, $mode) = @_;
unless ( $mode ) {
$self->_update_basic;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/PMM/Arena.pm view on Meta::CPAN
my ($x, $y) = @{ $monsters->{ $id } };
return { x => $x, y => $y };
}
sub update_position
{
my ($self, $monster, %args) = @_;
my $old_pos = $self->get_position( $monster );
return unless $self->validate_position( %args );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/Quake/Player.pm view on Meta::CPAN
###############################################
#
# update_stats
#
sub update_stats {
my ($self, $fraggee_name) = @_;
my $stats = $self->{_stats};
my $fraggee = Player->new(
_name => $fraggee_name,
view all matches for this distribution
view release on metacpan or search on metacpan
ZIO_Curses.pm view on Meta::CPAN
sub can_use_color {
return has_colors() ? 1 : 0;
}
sub update {
# force screen refresh
$w_main->refresh();
}
sub set_version {
view all matches for this distribution