[puzzle]华容道 15-Puzzle

24game
渐入佳境
渐入佳境
帖子: 54
注册时间: 2016年09月02日 22:09
联系:

Re: [puzzle]华容道 15-Puzzle

帖子 24game »

推荐一款华容道类型游戏:
Unpark Me
官方 HTML5 页面, 完全免费
https://html5.inlogic.sk/unparkme/

官方版 未提供中文语言
我为其添加了 简体中文 和 繁体中文, 并且可以脱离外网单机运行(借助 tinyweb 极轻量服务器工具建立本机服务器环境)

华容道类型游戏 Unpark Me 简体中文可单机运行版20200721(汉化 by neorobin)
链接:https://pan.baidu.com/s/1EXHQPeUOV0PW9MGwzj6I0g
提取码:
rvvl
压缩包解压密码:
mzm

[image 200,355]https://i.loli.net/2020/07/21/u3is2fUSZHyJMRz.png[/image] [image 200,355]https://i.loli.net/2020/07/21/DvSP4Mryj6EcLHY.png[/image] [image 200,355]https://i.loli.net/2020/07/21/gj38yDbeGMCP6al.png[/image]


滑块全是各类型汽车(小轿车,皮卡,卡车,巴士), 游戏地图为 6*6 格, 滑块类型为 2*1(小型车) 或者 3*1(大型车), 滑块只能横或纵向移动(汽车前进或后退, 不能侧滑), 汽车实物风格设计, 美工音效都很精致,
各类车型在移动时有不同的引擎声, 轻松的背景音乐和游戏动作音效都可开关.
游戏界面和难度都很容易上手, 难度共有 4 个级别: 新手,中等,高级,专家(beginner, intermediate, advanced, expert), 每关均按移动次数评星, 每个等级满星都是 180 颗星, 估计每级 60 关, 共 240 关. 每关的逻辑布局固定不变, 但每次重新打开都会为每个滑块选取同等大小的随机车型和涂色.

过关条件很简单, 就是把 红白条的 小车 开出右边出口, 当你为红白条小车清理出通往出口的通道, 它会自行开出过关; 有时在它开出之前, 你必须手动将 红白条 小车 左右移动若干格, 以便为其他车辆移动创造通道, 直到最后让 红白条 小车开往出口的通道打通.


游戏界面提供 6 或 7 种语言, 但没有中文, 不过好在界面很简单易懂, 即使完全不懂外语, 也完全可以猜出所有界面按钮的含义.

开发公司: Inlogic Software, 致力于手机 Android 和 HTML5 游戏

官方提供的 HTML5 版本:
https://html5.inlogic.sk/unparkme/

国内 7k7k 上有 FLASH 版本(其实是在 FLASH 内部运行 HTML5):
http://www.7k7k.com/swf/191192.htm

苹果 iOS 市场大陆区名为 解救小汽车
https://apps.apple.com/cn/app/%E8%A7%A3 ... 1435259047
头像
523066680
Administrator
Administrator
帖子: 573
注册时间: 2016年07月19日 12:14
联系:

Re: [puzzle]华容道 15-Puzzle

帖子 523066680 »

感谢分享
24game 写了:发个能玩的 UI 上来, 保存为 htm 单文件即可浏览器运行, 无任何依赖
图片
头像
rubyish
渐入佳境
渐入佳境
帖子: 52
注册时间: 2018年04月23日 09:58
联系:

Re: [puzzle]华容道 15-Puzzle

帖子 rubyish »

perl
#!/usr/bin/perl -w print "hello\n"

:crazylaugh4

$_
头像
rubyish
渐入佳境
渐入佳境
帖子: 52
注册时间: 2018年04月23日 09:58
联系:

Re: [puzzle]华容道 15-Puzzle

帖子 rubyish »

perl
#!/usr/bin/perl -w use 5.010; use warnings; sub i() { 0 } sub data() { 1 } sub true() { 1 } my $count = 0; sub gimme { my ( $it, $record ) = @_; return if !defined $record->{$it}; my $head = $record->{$it}; gimme( $head, $record ); say $count, ' ', '-' x ( 6 - length $count ); $count++; my @num = split //, $it; say "@num[ 0 .. 3 ]"; say "@num[ 4 .. 7 ]"; say "@num[ 8 .. 11 ]"; say "@num[ 12 .. 15 ]"; say ''; } sub find { my @it = split //, shift; for ( 0 .. 15 ) { return $_ if $it[$_] eq '0'; } } sub play { my ( $begin, $end ) = @_; my $record = { $begin => 'stop' }; if ( $begin eq $end ) { gimme $begin, $record; return; } my $poz = find $begin; my @todo = [ $poz, $begin ]; my @move = ( [ 1, 4 ], #0 [ 0, 2, 5 ], #1 [ 3, 1, 6 ], #2 [ 2, 7 ], #3 [ 0, 8, 5 ], #4 [ 1, 4, 6, 9 ], #5 [ 2, 7, 5, 10 ], #6 [ 3, 11, 6 ], #7 [ 12, 4, 9 ], #8 [ 5, 13, 8, 10 ], #9 [ 11, 14, 6, 9 ], #10 [ 15, 7, 10 ], #11 [ 8, 13 ], #12 [ 12, 14, 9 ], #13 [ 15, 13, 10 ], #14 [ 11, 14 ] #15 ); while (@todo) { my $it = shift @todo; my $i = $it->[i]; my $head = $it->[data]; for my $j ( @{ $move[$i] } ) { my $the = $head; substr( $the, $i, 1 ) = substr( $the, $j, 1 ); substr( $the, $j, 1 ) = '0'; next if exists $record->{$the}; $record->{$the} = $head; push @todo, [ $j, $the ]; if ( $the eq $end ) { gimme $the, $record; return; } } } say '[ impozsible ]'; } # __MAIN__ my @Old_Story = ( '234816075abc9def', '123456789abcdef0' ); play @Old_Story;

:diggingnoise7

BFS

$_
头像
rubyish
渐入佳境
渐入佳境
帖子: 52
注册时间: 2018年04月23日 09:58
联系:

Re: [puzzle]华容道 15-Puzzle

帖子 rubyish »

D BFS 目前最快了。 :look_around1

perl
#!/usr/bin/perl -w use 5.010; use warnings; sub i() { 0 } sub data() { 1 } sub pre() { 2 } sub true() { 1 } my $count = 0; sub pp { my ( $it, $dir ) = @_; return if !$it->[pre]; pp( $it->[pre], $dir ) if !$dir; say $count, ' ', '-' x ( 6 - length $count ); my @num = split //, $it->[data]; say "@num[ 0 .. 3 ]"; say "@num[ 4 .. 7 ]"; say "@num[ 8 .. 11 ]"; say "@num[ 12 .. 15 ]"; say ''; $count++; pp( $it->[pre], $dir ) if $dir; } sub find { my @it = split //, shift; for ( 0 .. 15 ) { return $_ if $it[$_] eq '0'; } } sub gimme { my ( $todo, $it ) = @_; for (@$todo) { return $_->[pre] if $it eq $_->[data]; } } sub play { my ( $x, $y ) = @_; if ( $x eq $y ) { pp [ 0, $x, [] ]; return; } my $i1 = find $x; my $i2 = find $y; my @todo = ( [ [ $i1, $x, [] ] ], [ [ $i2, $y, [] ] ] ); my @has = ( { $x => true }, { $y => true } ); my @move = ( [ 1, 4 ], #0 [ 0, 2, 5 ], #1 [ 3, 1, 6 ], #2 [ 2, 7 ], #3 [ 0, 8, 5 ], #4 [ 1, 4, 6, 9 ], #5 [ 2, 7, 5, 10 ], #6 [ 3, 11, 6 ], #7 [ 12, 4, 9 ], #8 [ 5, 13, 8, 10 ], #9 [ 11, 14, 6, 9 ], #10 [ 15, 7, 10 ], #11 [ 8, 13 ], #12 [ 12, 14, 9 ], #13 [ 15, 13, 10 ], #14 [ 11, 14 ] #15 ); while ( @{ $todo[0] } && @{ $todo[1] } ) { for my $dir ( 0, 1 ) { my $d = $dir ? 0 : 1; my $todo = $todo[$dir]; my $has = $has[$dir]; my $has2 = $has[$d]; my $it = shift @$todo; my $i0 = $it->[i]; for my $i ( @{ $move[$i0] } ) { my $this = $it->[data]; substr( $this, $i0, 1 ) = substr( $this, $i, 1 ); substr( $this, $i, 1 ) = '0'; next if exists $has->{$this}; my $new = [ $i, $this, $it ]; push @$todo, $new; $has->{$this} = true; if ( exists $has2->{$this} ) { my $rest = gimme $todo[$d], $this; pp $rest, 0 if $dir; pp $new, $dir; pp $rest, 1 if !$dir; return; } } # for move } # for 0, 1; } # while say '[ impossible ]'; } # __MAIN__ my @Old_Story = ( '234816075abc9def', '123456789abcdef0' ); play @Old_Story;
上次由 rubyish 在 2023年01月26日 03:19,总共编辑 1 次。
$_
头像
rubyish
渐入佳境
渐入佳境
帖子: 52
注册时间: 2018年04月23日 09:58
联系:

Re: [puzzle]华容道 15-Puzzle

帖子 rubyish »

:exciting4 格式不好

$_
回复

在线用户

正浏览此版面之用户: 没有注册用户 和 1 访客