2010-01-17から1日間の記事一覧

幅優先探索 perl版

以下、ソース。 use strict; my ($start,$goal); my @value = (); { my $_board =<<"EOD"; ************************** *S* * * * * * * ************* * * * * ************ * * * * ************** *********** * * ** *********************** * * G * * …

fn7 - 串カツなう

http://movapic.com/fn7/pic/1176073

fn7 - ビリケン見てきた

http://movapic.com/fn7/pic/1175912

[勉強][プログラミング][perl]幅優先探索 perl版 もういっちょ書いてみた

今度はファイルを読み込んで迷路を解く。 処理もちょっと変えてある。 use strict; use warnings; my $m = Maze->new(); $m->load('maze.txt'); $m->solve(); package Point; use strict; use warnings; sub new{ my ($class,$y,$x,$value) = @_; my $self =…