Help for this page

Select Code to Download


  1. or download this
    my $table = <<EOT
    0000000
    ...
    0002000
    0021000
    EOT
    
  2. or download this
    $table =~/(?|
              (?: ([12]) (?=      \1      \1      \1) ) | # (1)
              (?: ([12]) (?= .{7} \1 .{7} \1 .{7} \1) ) | # (2)
              (?: ([12]) (?= .{6} \1 .{6} \1 .{6} \1) ) | # (3)
              (?: ([12]) (?= .{8} \1 .{8} \1 .{8} \1) )   # (4)
              )/xs
    
  3. or download this
           $table =~ s/^ .{4} (?: .{7} . )* \K 0/1/xs
    
  4. or download this
       ./c4player [--depth=9] [--width=7] [--height=7] [--cpu=1]
    
  5. or download this
    #!/usr/bin/perl
    use strict;
    use warnings;
    ...
        $table =~ $score_pattern;
        return $color == $color{'white'} ? $eval_score : -$eval_score;
    }