Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^4: implementing a scrabble-esque game on Termux III and Path::Tiny output

by Aldebaran (Curate)
on Dec 03, 2019 at 06:53 UTC ( [id://11109579]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -le ' "abcd" =~ /.{2,}(?{print $&})(*FAIL)/ '
    abcd
    abc
    ...
    ef
    fg
    $
    
  2. or download this
        $board =~ /(?<!\w).{2,}(?!\w)(?{ push @pat, [ $-[0], $& ] })(*FAIL
    +)/;
    
        #dd @pat;
    ...
        say "patterns----------------";
    
        dd @pat;
    
  3. or download this
    default is 71 d.
    old is d.
    highs is 10
    ...
    ....s.....   0000100000
    /home/bob/4.scripts/distro/games/29-11-2019-16-37-01.txtmove is 2
    end of move, continue?
    
  4. or download this
    $ ./1.perlvar.pl 
    10
    15
    This is a Hello World program
     World 
    $
    
  5. or download this
    #!/usr/bin/perl
    
    use 5.016;
    ...
    say $str;
    
    say $+;            # This returns the last bracket result
    
  6. or download this
        my $newmask = ( $old ^ $word ) =~ tr/\0/\xff/cr;
        $flip and ( $board, $heights ) = flip $board, $heights;
        substr $board, $pos, length $word, $word;
    ...
        my $tiles = join '', @tiles;
        say "word is $word";
        $tiles =~ s/$_// for split //, $word & $newmask;
    
  7. or download this
    sub matchrule {
      my ( $old, $highs, $word ) = @_;
      $old eq $word and return 0;
    ...
      $tiles =~ s/$_// or return 0 for ( $newmask & $word ) =~ /\w/g;
      return 1;
    }
    
  8. or download this
    #my $return2=$save_file->append_utf8(@players);
    #say "return2 is $return2";
    
    ...
    
    #my $return2=$save_file->append_utf8({@players});
    #say "return2 is $return2";
    
  9. or download this
    @ARGV or @ARGV = qw( one two three four );    # for testing
    # ...
    ...
        tiles => [ sort splice @drawpile, 0, $maxtiles ]
        };
    }
    
  10. or download this
    # initiate time
    my $start = [gettimeofday];
    
    #print qq|$time{'yyyymmdd hh:mm:ss.mmm', $start}\n|;
    #$save_file->append_utf8("$time{'yyyymmdd hh:mm:ss.mmm', $start}\n");
    
  11. or download this
    ...
    Duration of move 4 is 27.942196
    ...
    patterns----------------
    Duration of move 5 is 31.07824
    Current player is 1
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11109579]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (1)
As of 2024-04-25 01:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found