[攻略] 【视频】萌新做了个**的迷宫8柱子解密,感谢2位前辈

  [复制链接]

0

主题

25

帖子

80

积分

Lv.2

Rank: 2Rank: 2

厉害
回复

使用道具 举报

3

主题

300

帖子

1478

积分

Lv.4

Rank: 4

试了试,好用非常,一会儿就把这个小游戏摸透了,现在可以直接自己解
回复

使用道具 举报

德瑞索

14

主题

280

帖子

1855

积分

Lv.4

Rank: 4

不得了 不得了  大佬就是强
回复

使用道具 举报

伊泽洛

18

主题

576

帖子

2488

积分

Lv.5

Rank: 5Rank: 5

圣物之盾

果然还是玩技术的牛B~感谢大佬~
回复

使用道具 举报

塑型者

57

主题

1360

帖子

5119

积分

Lv.8

Rank: 8Rank: 8

你这个迷宫柱子真的强
回复

使用道具 举报

塑型者

258

主题

3344

帖子

7411

积分

Lv.9

Rank: 9Rank: 9Rank: 9

迷宫的这些题很简单的-,-其实就是还原法,知道基础知识进行归类排列寻找自己的记忆点就好了,=。=好吧,你们听不懂
回复

使用道具 举报

吉尔菲

9

主题

74

帖子

232

积分

Lv.2

Rank: 2Rank: 2

程序猿真可怕
回复

使用道具 举报

希拉克

0

主题

21

帖子

127

积分

Lv.1

Rank: 1

// 准备一些变量
            var a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0;
            var a1 = 0, b1 = 0, c1 = 0, d1 = 0, e1 = 0, f1 = 0, g1 = 0, h1 = 0;
            var a2, b2, c2, d2, e2, f2, g2, h2;

            // 设置模拟器
            $("#begin").click(function () {
                $("#free div").each(function () {
                    $(this).prop('class', 'empty');
                });

                getBefore();
                $("#free div").each(function (i) {
                    var id = $(this).prop("id");
                    if (id == "a3") {
                        if (a1 > 0) {
                            $(this).prop('class', 'full');
                        }
                    }
                    if (id == "b3") {
                        if (b1 > 0) {
                            $(this).prop('class', 'full');
                        }
                    }
                    if (id == "c3") {
                        if (c1 > 0) {
                            $(this).prop('class', 'full');
                        }
                    }

                    if (id == "d3") {
                        if (d1 > 0) {
                            $(this).prop('class', 'full');
                        }
                    }

                    if (id == "e3") {
                        if (e1 > 0) {
                            $(this).prop('class', 'full');
                        }
                    }

                    if (id == "f3") {
                        if (f1 > 0) {
                            $(this).prop('class', 'full');
                        }
                    }

                    if (id == "g3") {
                        if (g1 > 0) {
                            $(this).prop('class', 'full');
                        }
                    }

                    if (id == "h3") {
                        if (h1 > 0) {
                            $(this).prop('class', 'full');
                        }
                    }
                });
            });

            function getColor(now) {
                if ($(now).prop("className")== 'empty') {
                        return 0;
                } else {
                    return 1;
                }
            }

            // 获取数据
            function getBefore() {
                $("#before div").each(function (i) {
                    var id = $(this).prop("id");
                    if (id == "a1") {                        
                        a1 = getColor($(this));
                    }
                    if (id == "b1") {
                        b1 = getColor($(this));
                    }
                    if (id == "c1") {
                        c1 = getColor($(this));
                    }
                    if (id == "d1") {
                        d1 = getColor($(this));
                    }
                    if (id == "e1") {
                        e1 = getColor($(this));
                    }
                    if (id == "f1") {
                        f1 = getColor($(this));
                    }
                    if (id == "g1") {
                        g1 = getColor($(this));
                    }
                    if (id == "h1") {
                        h1 = getColor($(this));
                    }
                });
            }

            // 开始计算
            $("#go").click(function () {
         
                getBefore();
                $("#after div").each(function () {
                    $(this).prop('class', 'empty');
                });

                for (a = 0; a <= 1; a++)
                {

                    for (b = 0; b <= 1; b++)
                    {
                        for (c = 0; c <= 1; c++)
                        {
                            for (d = 0; d <= 1; d++)
                            {
                                for (e = 0; e <= 1; e++)
                                {
                                    for (f = 0; f <= 1; f++)
                                    {
                                        for (g = 0; g <= 1; g++)
                                        {
                                            for (h = 0; h <= 1; h++)
                                            {
                                                a2 = h + a + b + a1;
                                                b2 = a + b + c + b1;
                                                c2 = b + c + d + c1;
                                                d2 = c + d + e + d1;
                                                e2 = d + e + f + e1;
                                                f2 = e + f + g + f1;
                                                g2 = f + g + h + g1;
                                                h2 = g + h + a + h1;
                                                if (((a2 == 0) || (a2 == 2) || (a2 == 4)) && ((b2 == 0) || (b2 == 2) || (b2 == 4)) && ((c2 == 0) || (c2 == 2) || (c2 == 4)) && ((d2 == 0) || (d2 == 2) || (d2 == 4))
                                                        && ((e2 == 0) || (e2 == 2) || (e2 == 4)) && ((f2 == 0) || (f2 == 2) || (f2 == 4)) && ((g2 == 0) || (g2 == 2) || (g2 == 4)) && ((h2 == 0) || (h2 == 2) || (h2 == 4)))

                                                {
                           
                                                
                                                    // 输出结果
                                                    $("#after div").each(function (i) {
                                                        var id = $(this).prop("id");
                                                        if (id == "a2") {
                                                            if (a == 0) {
                                                                $(this).prop('class', 'full');
                                                            }
                                                        }
                                                        if (id == "b2") {
                                                            if (b == 0) {
                                                                $(this).prop('class', 'full');
                                                            }
                                                        }
                                                        if (id == "c2") {
                                                            if (c == 0) {
                                                                $(this).prop('class', 'full');
                                                            }
                                                        }

                                                        if (id == "d2") {
                                                            if (d == 0) {
                                                                $(this).prop('class', 'full');
                                                            }
                                                        }

                                                        if (id == "e2") {
                                                            if (e == 0) {
                                                                $(this).prop('class', 'full');
                                                            }
                                                        }

                                                        if (id == "f2") {
                                                            if (f == 0) {
                                                                $(this).prop('class', 'full');
                                                            }
                                                        }

                                                        if (id == "g2") {
                                                            if (g == 0) {
                                                                $(this).prop('class', 'full');
                                                            }
                                                        }

                                                        if (id == "h2") {
                                                            if (h == 0) {
                                                                $(this).prop('class', 'full');
                                                            }
                                                        }
                                                    });
                                                    return false; // 成功跳出循环
                                                }

                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }



            });
回复

使用道具 举报

巨蛛之母

7

主题

150

帖子

679

积分

Lv.3

Rank: 3Rank: 3Rank: 3

技术宅拯救世界。
回复

使用道具 举报

巨蛛之母

7

主题

150

帖子

679

积分

Lv.3

Rank: 3Rank: 3Rank: 3

技术宅拯救世界。
回复

使用道具 举报

0

主题

14

帖子

62

积分

Lv.2

Rank: 2Rank: 2

这个不会自动帮忙解?
回复

使用道具 举报

塑型者

53

主题

3735

帖子

1万

积分

Lv.10

StevenZ

Rank: 10Rank: 10Rank: 10Rank: 10

圣物之盾

这类的分享 不应该点赞吗?
回复

使用道具 举报

福尔

7

主题

117

帖子

697

积分

Lv.3

Rank: 3Rank: 3Rank: 3

偶尔碰到解一解,专门跑迷宫的都直接无视趣味小游戏的,不过对萌新还是挺有帮助的,费心了!
回复

使用道具 举报

2

主题

89

帖子

242

积分

Lv.2

Rank: 2Rank: 2

谢谢分享
回复

使用道具 举报

冈姆

2

主题

298

帖子

1824

积分

Lv.4

Rank: 4

可以可以,很好用
回复

使用道具 举报

德瑞索

12

主题

268

帖子

1718

积分

Lv.4

Rank: 4

已收藏 这就六了,妈妈再也不怕我点不开柱 子了
回复

使用道具 举报

伊泽洛

24

主题

432

帖子

2616

积分

Lv.5

Rank: 5Rank: 5

6哇,可以的,虽然不跑迷宫
回复

使用道具 举报

伊泽洛

35

主题

433

帖子

2029

积分

Lv.5

Rank: 5Rank: 5

这个必须永久保留!!!
回复

使用道具 举报

德瑞索

17

主题

205

帖子

1482

积分

Lv.4

Rank: 4

好棒,收藏了,感谢楼主
回复

使用道具 举报

巨蛛之母

28

主题

196

帖子

623

积分

Lv.3

Rank: 3Rank: 3Rank: 3

感谢制作分享  掐指一算  下赛季你要掉镜子
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

论坛合作、疑问请点击给我发信息 点击链接加入群聊【17173有料社区】