分享创作 小游戏-井字棋

星季工作室 · 2019年08月10日 · 最后由 星季工作室 回复于 2019年08月11日 · 43 次阅读

心累,做这个游戏好多标点符号打错了,放进蝶梦一直错误。 改符号改了一小时。/n 测试链接'https://www.iwzyx.com/games/5619'



  井字棋

=:MD.胜利次数=0

=:MD.失败次数=0

[初始]

=: var d1 ="⬜"

=: var d2 ="⬜"

=: var d3 ="⬜"

=: var d4 ="⬜"

=: var d5 ="⬜"

=: var d6 ="⬜"

=: var d7 ="⬜"

=: var d8 ="⬜"

=: var d9 ="⬜"

=:MD.次数=0

[游戏3]
[|]
✔是你,✘是机器人。
请落子。
(b)1(/b)|(b)2(/b)|(b)3(/b)<hr/>
(b)4(/b)|(b)5(/b)|(b)6(/b)<hr/>
(b)7(/b)|(b)8(/b)|(b)9(/b)
<br>
胜利次数:(j)MD.胜利次数(/j)
失败次数:(j)MD.失败次数(/j)
选:(j)d1(/j)
选:(j)d2(/j)
选:(j)d3(/j)
选:(j)d4(/j)
选:(j)d5(/j)
选:(j)d6(/j)
选:(j)d7(/j)
选:(j)d8(/j)
选:(j)d9(/j)

[(j)d1(/j)]

=: if( d1== "✔" ) game_jumpto("无法落子") ;

=: if( d1== "✘" ) game_jumpto("无法落子") ;

=: if( d1== "⬜" ) game_jumpto("落子1") ;

[(j)d2(/j)]

=: if( d2== "✔" ) game_jumpto("无法落子") ;

=: if( d2== "✘" ) game_jumpto("无法落子") ;

=: if( d2== "⬜" ) game_jumpto("落子2") ;

[(j)d3(/j)]

=: if( d3== "✔" ) game_jumpto("无法落子") ;

=: if( d3== "✘" ) game_jumpto("无法落子") ;

=: if( d3== "⬜" ) game_jumpto("落子3") ;

[(j)d4(/j)]

=: if( d4== "✔" ) game_jumpto("无法落子") ;

=: if( d4== "✘" ) game_jumpto("无法落子") ;

=: if( d4== "⬜" ) game_jumpto("落子4") ;

[(j)d5(/j)]

=: if( d5== "✔" ) game_jumpto("无法落子") ;

=: if( d5== "✘" ) game_jumpto("无法落子") ;

=: if( d5== "⬜" ) game_jumpto("落子5") ;

[(j)d6(/j)]

=: if( d6== "✔" ) game_jumpto("无法落子") ;

=: if( d6== "✘" ) game_jumpto("无法落子") ;

=: if( d6== "⬜" ) game_jumpto("落子6") ;

[(j)d7(/j)]

=: if( d7== "✔" ) game_jumpto("无法落子") ;

=: if( d7== "✘" ) game_jumpto("无法落子") ;

=: if( d7== "⬜" ) game_jumpto("落子7") ;

[(j)d8(/j)]

=: if( d8== "✔" ) game_jumpto("无法落子") ;

=: if( d8== "✘" ) game_jumpto("无法落子") ;

=: if( d8== "⬜" ) game_jumpto("落子8") ;

[(j)d9(/j)]

=: if( d9== "✔" ) game_jumpto("无法落子") ;

=: if( d9== "✘" ) game_jumpto("无法落子") ;

=: if( d9== "⬜" ) game_jumpto("落子9") ;

[无法落子]
[|]
该棋格已被覆盖,请重新选择。
等:1|
跳:游戏

[落子1]
[|]

=: var d1 ="✔"

=:MD.次数+=1
落子成功。
等:1|
跳:机器人

[落子2]
[|]

=: var d2 ="✔"

=:MD.次数+=1
落子成功。
等:1|
跳:机器人

[落子3]
[|]

=: var d3 ="✔"

=:MD.次数+=1
落子成功。
等:1|
跳:机器人

[落子4]
[|]

=: var d4 ="✔"

=:MD.次数+=1
落子成功。
等:1|
跳:机器人

[落子5]
[|]

=: var d5 ="✔"

=:MD.次数+=1
落子成功。
等:1|
跳:机器人

[落子6]
[|]

=: var d6 ="✔"

=:MD.次数+=1
落子成功。
等:1|
跳:机器人

[落子7]
[|]

=: var d7 ="✔"

=:MD.次数+=1
落子成功。
等:1|
跳:机器人

[落子8]
[|]

=: var d8 ="✔"

=:MD.次数+=1
落子成功。
等:1|
跳:机器人

[落子9]
[|]

=: var d9 ="✔"

=:MD.次数+=1
落子成功。
等:1|
跳:机器人

[机器人]

=:MD.棋格=random_int(1,9)

=: if( MD.棋格== 1 ) game_jumpto("n1") ;

=: if( MD.棋格== 2 ) game_jumpto("n2") ;

=: if( MD.棋格== 3 ) game_jumpto("n3") ;

=: if( MD.棋格== 4 ) game_jumpto("n4") ;

=: if( MD.棋格== 5 ) game_jumpto("n5") ;

=: if( MD.棋格== 6 ) game_jumpto("n6") ;

=: if( MD.棋格== 7 ) game_jumpto("n7") ;

=: if( MD.棋格== 8 ) game_jumpto("n8") ;

=: if( MD.棋格== 9 ) game_jumpto("n9") ;

[n1]

=: if( d1== "✔" ) game_jumpto("无法落子1") ;

=: if( d1== "✘" ) game_jumpto("无法落子1") ;

=: if( d1== "⬜" ) game_jumpto("s1") ;

[n2]

=: if( d2== "✔" ) game_jumpto("无法落子1") ;

=: if( d2== "✘" ) game_jumpto("无法落子1") ;

=: if( d2== "⬜" ) game_jumpto("s2") ;

[n3]

=: if( d3== "✔" ) game_jumpto("无法落子1") ;

=: if( d3== "✘" ) game_jumpto("无法落子1") ;

=: if( d3== "⬜" ) game_jumpto("s3") ;

[n4]

=: if( d4== "✔" ) game_jumpto("无法落子1") ;

=: if( d4== "✘" ) game_jumpto("无法落子1") ;

=: if( d4== "⬜" ) game_jumpto("s4") ;

[n5]

=: if( d5== "✔" ) game_jumpto("无法落子1") ;

=: if( d5== "✘" ) game_jumpto("无法落子1") ;

=: if( d5== "⬜" ) game_jumpto("s5") ;

[n6]

=: if( d6== "✔" ) game_jumpto("无法落子1") ;

=: if( d6== "✘" ) game_jumpto("无法落子1") ;

=: if( d6== "⬜" ) game_jumpto("s6") ;

[n7]

=: if( d7== "✔" ) game_jumpto("无法落子1") ;

=: if( d7== "✘" ) game_jumpto("无法落子1") ;

=: if( d7== "⬜" ) game_jumpto("s7") ;

[n8]

=: if( d8== "✔" ) game_jumpto("无法落子1") ;

=: if( d8== "✘" ) game_jumpto("无法落子1") ;

=: if( d8== "⬜" ) game_jumpto("s8") ;

[n9]

=: if( d9== "✔" ) game_jumpto("无法落子1") ;

=: if( d9== "✘" ) game_jumpto("无法落子1") ;

=: if( d9== "⬜" ) game_jumpto("s9") ;

[无法落子1]

跳:机器人

[s1]
[|]

=: var d1 ="✘"

跳:游戏

[s2]
[|]

=: var d2 ="✘"

跳:游戏


[s3]
[|]

=: var d3 ="✘"

跳:游戏

[s4]
[|]

=: var d4 ="✘"

跳:游戏

[s5]
[|]

=: var d5 ="✘"

跳:游戏

[s6]
[|]

=: var d6 ="✘"

跳:游戏

[s7]
[|]

=: var d7 ="✘"

跳:游戏

[s8]
[|]

=: var d8 ="✘"

跳:游戏

[s9]
[|]

=: var d9 ="✘"

跳:游戏

[游戏]

=: if( d1== "✔" ) game_jumpto("159") ;

=: if( d2== "✔" ) game_jumpto("258") ;

=: if( d3== "✔" ) game_jumpto("357") ;

=: if( d4== "✔" ) game_jumpto("456") ;

[游戏1]

=: if( d1== "✔" ) game_jumpto("123") ;

=: if( d7== "✔" ) game_jumpto("789") ;

=: if( d4== "✔" ) game_jumpto("147") ;

=: if( d6== "✔" ) game_jumpto("369") ;

[游戏2]

=: if( MD.次数== 5 ) game_jumpto("失败") ;else game_jumpto("游戏3")

[159]

=: if( d5== "✔" ) game_jumpto("159/") ;else game_jumpto("游戏1")

[159/]

=: if( d9== "" ) game_jumpto("胜利") ;else game_jumpto("游戏1")

[258]

=: if( d5== "" ) game_jumpto("258/") ;else game_jumpto("游戏1")

[258/]

=: if( d8== "" ) game_jumpto("胜利") ;else game_jumpto("游戏1")

[357]

=: if( d5== "" ) game_jumpto("357/") ;else game_jumpto("游戏1")

[357/]

=: if( d7== "" ) game_jumpto("胜利") ;else game_jumpto("游戏1")

[456]

=: if( d5== "" ) game_jumpto("456/") ;else game_jumpto("游戏1")

[456/]

=: if( d6== "" ) game_jumpto("胜利") ;else game_jumpto("游戏1")

[123]

=: if( d2== "" ) game_jumpto("123/") ;else game_jumpto("游戏2")

[123/]

=: if( d3== "" ) game_jumpto("胜利") ;else game_jumpto("游戏2")

[789/]

=: if( d8== "" ) game_jumpto("789/") ;else game_jumpto("游戏2")

[789/]

=: if( d9== "" ) game_jumpto("胜利") ;else game_jumpto("游戏2")

[147]

=: if( d4== "" ) game_jumpto("147/") ;else game_jumpto("游戏2")

[147/]

=: if( d7== "" ) game_jumpto("胜利") ;else game_jumpto("游戏2")

[369]

=: if( d6== "" ) game_jumpto("369/") ;else game_jumpto("游戏2")

[369/]

=: if( d9== "" ) game_jumpto("胜利") ;else game_jumpto("游戏2")

[胜利]

=:MD.胜利次数+=1
你胜利了。
跳:初始

[失败]

=:MD.失败次数+=1
你失败了。
跳:初始

共收到 5 条回复


  井字棋

=:MD.胜利次数=0

=:MD.失败次数=0

[初始]

=: var d1 ="⬜"

=: var d2 ="⬜"

=: var d3 ="⬜"

=: var d4 ="⬜"

=: var d5 ="⬜"

=: var d6 ="⬜"

=: var d7 ="⬜"

=: var d8 ="⬜"

=: var d9 ="⬜"

=:MD.次数=0

[游戏3]
[|]
<center>✔是你,✘是机器人。
<center>请落子。
<center>开局玩家先行,如若要机器人先行请点击废子。
<center>(b)1(/b)|(b)2(/b)|(b)3(/b)<hr/><center>(b)4(/b)|(b)5(/b)|(b)6(/b)<hr/><center>(b)7(/b)|(b)8(/b)|(b)9(/b)
<br>
胜利次数:(j)MD.胜利次数(/j)
失败次数:(j)MD.失败次数(/j)
选:(j)d1(/j)
选:(j)d2(/j)
选:(j)d3(/j)
选:(j)d4(/j)
选:(j)d5(/j)
选:(j)d6(/j)
选:(j)d7(/j)
选:(j)d8(/j)
选:(j)d9(/j)
选:废子

[废子]

=:MD.次数+=1

跳:机器人

[(j)d1(/j)]

=: if( d1== "✔" ) game_jumpto("无法落子") ;

=: if( d1== "✘" ) game_jumpto("无法落子") ;

=: if( d1== "⬜" ) game_jumpto("落子1") ;

[(j)d2(/j)]

=: if( d2== "✔" ) game_jumpto("无法落子") ;

=: if( d2== "✘" ) game_jumpto("无法落子") ;

=: if( d2== "⬜" ) game_jumpto("落子2") ;

[(j)d3(/j)]

=: if( d3== "✔" ) game_jumpto("无法落子") ;

=: if( d3== "✘" ) game_jumpto("无法落子") ;

=: if( d3== "⬜" ) game_jumpto("落子3") ;

[(j)d4(/j)]

=: if( d4== "✔" ) game_jumpto("无法落子") ;

=: if( d4== "✘" ) game_jumpto("无法落子") ;

=: if( d4== "⬜" ) game_jumpto("落子4") ;

[(j)d5(/j)]

=: if( d5== "✔" ) game_jumpto("无法落子") ;

=: if( d5== "✘" ) game_jumpto("无法落子") ;

=: if( d5== "⬜" ) game_jumpto("落子5") ;

[(j)d6(/j)]

=: if( d6== "✔" ) game_jumpto("无法落子") ;

=: if( d6== "✘" ) game_jumpto("无法落子") ;

=: if( d6== "⬜" ) game_jumpto("落子6") ;

[(j)d7(/j)]

=: if( d7== "✔" ) game_jumpto("无法落子") ;

=: if( d7== "✘" ) game_jumpto("无法落子") ;

=: if( d7== "⬜" ) game_jumpto("落子7") ;

[(j)d8(/j)]

=: if( d8== "✔" ) game_jumpto("无法落子") ;

=: if( d8== "✘" ) game_jumpto("无法落子") ;

=: if( d8== "⬜" ) game_jumpto("落子8") ;

[(j)d9(/j)]

=: if( d9== "✔" ) game_jumpto("无法落子") ;

=: if( d9== "✘" ) game_jumpto("无法落子") ;

=: if( d9== "⬜" ) game_jumpto("落子9") ;

[无法落子]
[|]
该棋格已被覆盖,请重新选择。
等:1|
跳:游戏

[落子1]

=: var d1 ="✔"

=:MD.次数+=1
跳:机器人

[落子2]

=: var d2 ="✔"

=:MD.次数+=1

跳:机器人

[落子3]

=: var d3 ="✔"

=:MD.次数+=1

跳:机器人

[落子4]

=: var d4 ="✔"

=:MD.次数+=1

跳:机器人

[落子5]

=: var d5 ="✔"

=:MD.次数+=1

跳:机器人

[落子6]

=: var d6 ="✔"

=:MD.次数+=1

跳:机器人

[落子7]

=: var d7 ="✔"

=:MD.次数+=1

跳:机器人

[落子8]

=: var d8 ="✔"

=:MD.次数+=1

跳:机器人

[落子9]

=: var d9 ="✔"

=:MD.次数+=1

跳:机器人

[机器人]

=:MD.棋格=random_int(1,9)

=: if( MD.棋格== 1 ) game_jumpto("n1") ;

=: if( MD.棋格== 2 ) game_jumpto("n2") ;

=: if( MD.棋格== 3 ) game_jumpto("n3") ;

=: if( MD.棋格== 4 ) game_jumpto("n4") ;

=: if( MD.棋格== 5 ) game_jumpto("n5") ;

=: if( MD.棋格== 6 ) game_jumpto("n6") ;

=: if( MD.棋格== 7 ) game_jumpto("n7") ;

=: if( MD.棋格== 8 ) game_jumpto("n8") ;

=: if( MD.棋格== 9 ) game_jumpto("n9") ;

[n1]

=: if( d1== "✔" ) game_jumpto("无法落子1") ;

=: if( d1== "✘" ) game_jumpto("无法落子1") ;

=: if( d1== "⬜" ) game_jumpto("s1") ;

[n2]

=: if( d2== "✔" ) game_jumpto("无法落子1") ;

=: if( d2== "✘" ) game_jumpto("无法落子1") ;

=: if( d2== "⬜" ) game_jumpto("s2") ;

[n3]

=: if( d3== "✔" ) game_jumpto("无法落子1") ;

=: if( d3== "✘" ) game_jumpto("无法落子1") ;

=: if( d3== "⬜" ) game_jumpto("s3") ;

[n4]

=: if( d4== "✔" ) game_jumpto("无法落子1") ;

=: if( d4== "✘" ) game_jumpto("无法落子1") ;

=: if( d4== "⬜" ) game_jumpto("s4") ;

[n5]

=: if( d5== "✔" ) game_jumpto("无法落子1") ;

=: if( d5== "✘" ) game_jumpto("无法落子1") ;

=: if( d5== "⬜" ) game_jumpto("s5") ;

[n6]

=: if( d6== "✔" ) game_jumpto("无法落子1") ;

=: if( d6== "✘" ) game_jumpto("无法落子1") ;

=: if( d6== "⬜" ) game_jumpto("s6") ;

[n7]

=: if( d7== "✔" ) game_jumpto("无法落子1") ;

=: if( d7== "✘" ) game_jumpto("无法落子1") ;

=: if( d7== "⬜" ) game_jumpto("s7") ;

[n8]

=: if( d8== "✔" ) game_jumpto("无法落子1") ;

=: if( d8== "✘" ) game_jumpto("无法落子1") ;

=: if( d8== "⬜" ) game_jumpto("s8") ;

[n9]

=: if( d9== "✔" ) game_jumpto("无法落子1") ;

=: if( d9== "✘" ) game_jumpto("无法落子1") ;

=: if( d9== "⬜" ) game_jumpto("s9") ;

[无法落子1]

跳:机器人

[s1]
[|]

=: var d1 ="✘"

跳:游戏

[s2]
[|]

=: var d2 ="✘"

跳:游戏


[s3]
[|]

=: var d3 ="✘"

跳:游戏

[s4]
[|]

=: var d4 ="✘"

跳:游戏

[s5]
[|]

=: var d5 ="✘"

跳:游戏

[s6]
[|]

=: var d6 ="✘"

跳:游戏

[s7]
[|]

=: var d7 ="✘"

跳:游戏

[s8]
[|]

=: var d8 ="✘"

跳:游戏

[s9]
[|]

=: var d9 ="✘"

跳:游戏

[游戏]

=: if( d1== "✔" ) game_jumpto("159") ;

=: if( d2== "✔" ) game_jumpto("258") ;

=: if( d3== "✔" ) game_jumpto("357") ;

=: if( d4== "✔" ) game_jumpto("456") ;

[游戏1]

=: if( d1== "✔" ) game_jumpto("123") ;

=: if( d7== "✔" ) game_jumpto("789") ;

=: if( d4== "✔" ) game_jumpto("147") ;

=: if( d6== "✔" ) game_jumpto("369") ;

[游戏2]
[|]
落子成功。
等:1|
=: if( MD.次数== 5 ) game_jumpto("失败") ;else game_jumpto("游戏3")



[159]

=: if( d5== "✔" ) game_jumpto("159/") ;else game_jumpto("游戏1")

[159/]

=: if( d9== "" ) game_jumpto("胜利") ;else game_jumpto("游戏1")

[258]

=: if( d5== "" ) game_jumpto("258/") ;else game_jumpto("游戏1")

[258/]

=: if( d8== "" ) game_jumpto("胜利") ;else game_jumpto("游戏1")

[357]

=: if( d5== "" ) game_jumpto("357/") ;else game_jumpto("游戏1")

[357/]

=: if( d7== "" ) game_jumpto("胜利") ;else game_jumpto("游戏1")

[456]

=: if( d5== "" ) game_jumpto("456/") ;else game_jumpto("游戏1")

[456/]

=: if( d6== "" ) game_jumpto("胜利") ;else game_jumpto("游戏1")

[123]

=: if( d2== "" ) game_jumpto("123/") ;else game_jumpto("游戏2")

[123/]

=: if( d3== "" ) game_jumpto("胜利") ;else game_jumpto("游戏2")

[789/]

=: if( d8== "" ) game_jumpto("789/") ;else game_jumpto("游戏2")

[789/]

=: if( d9== "" ) game_jumpto("胜利") ;else game_jumpto("游戏2")

[147]

=: if( d1== "" ) game_jumpto("147/") ;else game_jumpto("游戏2")

[147/]

=: if( d7== "" ) game_jumpto("胜利") ;else game_jumpto("游戏2")

[369]

=: if( d3== "" ) game_jumpto("369/") ;else game_jumpto("游戏2")

[369/]

=: if( d9== "" ) game_jumpto("胜利") ;else game_jumpto("游戏2")

[胜利]

=:MD.胜利次数+=1
你胜利了。
跳:初始

[失败]

=:MD.失败次数+=1
你失败了。
跳:初始




  井字棋

=:MD.胜利次数=0

=:MD.失败次数=0

[初始]

=: var d1 ="⬜"

=: var d2 ="⬜"

=: var d3 ="⬜"

=: var d4 ="⬜"

=: var d5 ="⬜"

=: var d6 ="⬜"

=: var d7 ="⬜"

=: var d8 ="⬜"

=: var d9 ="⬜"

=:MD.次数=0

[游戏3]
[|]
<center>✔是你,✘是机器人。
<center>请落子。
<center>开局玩家先行,如若要机器人先行请点击废子。<hr/>
<center>(b)1(/b)|(b)2(/b)|(b)3(/b)<hr/><center>(b)4(/b)|(b)5(/b)|(b)6(/b)<hr/><center>(b)7(/b)|(b)8(/b)|(b)9(/b)
<br>
胜利次数:(j)MD.胜利次数(/j)
失败次数:(j)MD.失败次数(/j)
选:(j)d1(/j)
选:(j)d2(/j)
选:(j)d3(/j)
选:(j)d4(/j)
选:(j)d5(/j)
选:(j)d6(/j)
选:(j)d7(/j)
选:(j)d8(/j)
选:(j)d9(/j)
选:废子

[废子]

=:MD.次数+=1

跳:机器人

[(j)d1(/j)]

=: if( d1== "✔" ) game_jumpto("无法落子") ;

=: if( d1== "✘" ) game_jumpto("无法落子") ;

=: if( d1== "⬜" ) game_jumpto("落子1") ;

[(j)d2(/j)]

=: if( d2== "✔" ) game_jumpto("无法落子") ;

=: if( d2== "✘" ) game_jumpto("无法落子") ;

=: if( d2== "⬜" ) game_jumpto("落子2") ;

[(j)d3(/j)]

=: if( d3== "✔" ) game_jumpto("无法落子") ;

=: if( d3== "✘" ) game_jumpto("无法落子") ;

=: if( d3== "⬜" ) game_jumpto("落子3") ;

[(j)d4(/j)]

=: if( d4== "✔" ) game_jumpto("无法落子") ;

=: if( d4== "✘" ) game_jumpto("无法落子") ;

=: if( d4== "⬜" ) game_jumpto("落子4") ;

[(j)d5(/j)]

=: if( d5== "✔" ) game_jumpto("无法落子") ;

=: if( d5== "✘" ) game_jumpto("无法落子") ;

=: if( d5== "⬜" ) game_jumpto("落子5") ;

[(j)d6(/j)]

=: if( d6== "✔" ) game_jumpto("无法落子") ;

=: if( d6== "✘" ) game_jumpto("无法落子") ;

=: if( d6== "⬜" ) game_jumpto("落子6") ;

[(j)d7(/j)]

=: if( d7== "✔" ) game_jumpto("无法落子") ;

=: if( d7== "✘" ) game_jumpto("无法落子") ;

=: if( d7== "⬜" ) game_jumpto("落子7") ;

[(j)d8(/j)]

=: if( d8== "✔" ) game_jumpto("无法落子") ;

=: if( d8== "✘" ) game_jumpto("无法落子") ;

=: if( d8== "⬜" ) game_jumpto("落子8") ;

[(j)d9(/j)]

=: if( d9== "✔" ) game_jumpto("无法落子") ;

=: if( d9== "✘" ) game_jumpto("无法落子") ;

=: if( d9== "⬜" ) game_jumpto("落子9") ;

[无法落子]
[|]
该棋格已被覆盖,请重新选择。
等:1|
跳:游戏

[落子1]

=: var d1 ="✔"

=:MD.次数+=1
跳:机器人

[落子2]

=: var d2 ="✔"

=:MD.次数+=1

跳:机器人

[落子3]

=: var d3 ="✔"

=:MD.次数+=1

跳:机器人

[落子4]

=: var d4 ="✔"

=:MD.次数+=1

跳:机器人

[落子5]

=: var d5 ="✔"

=:MD.次数+=1

跳:机器人

[落子6]

=: var d6 ="✔"

=:MD.次数+=1

跳:机器人

[落子7]

=: var d7 ="✔"

=:MD.次数+=1

跳:机器人

[落子8]

=: var d8 ="✔"

=:MD.次数+=1

跳:机器人

[落子9]

=: var d9 ="✔"

=:MD.次数+=1

跳:机器人

[机器人]

=:MD.棋格=random_int(1,9)

=: if( MD.棋格== 1 ) game_jumpto("n1") ;

=: if( MD.棋格== 2 ) game_jumpto("n2") ;

=: if( MD.棋格== 3 ) game_jumpto("n3") ;

=: if( MD.棋格== 4 ) game_jumpto("n4") ;

=: if( MD.棋格== 5 ) game_jumpto("n5") ;

=: if( MD.棋格== 6 ) game_jumpto("n6") ;

=: if( MD.棋格== 7 ) game_jumpto("n7") ;

=: if( MD.棋格== 8 ) game_jumpto("n8") ;

=: if( MD.棋格== 9 ) game_jumpto("n9") ;

[n1]

=: if( d1== "✔" ) game_jumpto("无法落子1") ;

=: if( d1== "✘" ) game_jumpto("无法落子1") ;

=: if( d1== "⬜" ) game_jumpto("s1") ;

[n2]

=: if( d2== "✔" ) game_jumpto("无法落子1") ;

=: if( d2== "✘" ) game_jumpto("无法落子1") ;

=: if( d2== "⬜" ) game_jumpto("s2") ;

[n3]

=: if( d3== "✔" ) game_jumpto("无法落子1") ;

=: if( d3== "✘" ) game_jumpto("无法落子1") ;

=: if( d3== "⬜" ) game_jumpto("s3") ;

[n4]

=: if( d4== "✔" ) game_jumpto("无法落子1") ;

=: if( d4== "✘" ) game_jumpto("无法落子1") ;

=: if( d4== "⬜" ) game_jumpto("s4") ;

[n5]

=: if( d5== "✔" ) game_jumpto("无法落子1") ;

=: if( d5== "✘" ) game_jumpto("无法落子1") ;

=: if( d5== "⬜" ) game_jumpto("s5") ;

[n6]

=: if( d6== "✔" ) game_jumpto("无法落子1") ;

=: if( d6== "✘" ) game_jumpto("无法落子1") ;

=: if( d6== "⬜" ) game_jumpto("s6") ;

[n7]

=: if( d7== "✔" ) game_jumpto("无法落子1") ;

=: if( d7== "✘" ) game_jumpto("无法落子1") ;

=: if( d7== "⬜" ) game_jumpto("s7") ;

[n8]

=: if( d8== "✔" ) game_jumpto("无法落子1") ;

=: if( d8== "✘" ) game_jumpto("无法落子1") ;

=: if( d8== "⬜" ) game_jumpto("s8") ;

[n9]

=: if( d9== "✔" ) game_jumpto("无法落子1") ;

=: if( d9== "✘" ) game_jumpto("无法落子1") ;

=: if( d9== "⬜" ) game_jumpto("s9") ;else game_jumpto("胜利")

[无法落子1]

跳:机器人

[s1]
[|]

=: var d1 ="✘"

跳:游戏

[s2]
[|]

=: var d2 ="✘"

跳:游戏


[s3]
[|]

=: var d3 ="✘"

跳:游戏

[s4]
[|]

=: var d4 ="✘"

跳:游戏

[s5]
[|]

=: var d5 ="✘"

跳:游戏

[s6]
[|]

=: var d6 ="✘"

跳:游戏

[s7]
[|]

=: var d7 ="✘"

跳:游戏

[s8]
[|]

=: var d8 ="✘"

跳:游戏

[s9]
[|]

=: var d9 ="✘"

跳:游戏

[游戏]

=: if( d1== "✔" ) game_jumpto("159") ;

=: if( d2== "✔" ) game_jumpto("258") ;

=: if( d3== "✔" ) game_jumpto("357") ;

=: if( d4== "✔" ) game_jumpto("456") ;

[游戏1]

=: if( d1== "✔" ) game_jumpto("123") ;

=: if( d7== "✔" ) game_jumpto("789") ;

=: if( d4== "✔" ) game_jumpto("147") ;

=: if( d6== "✔" ) game_jumpto("369") ;

[游戏2]
[|]
落子成功。
等:1|
=: if( MD.次数== 5 ) game_jumpto("失败") ;else game_jumpto("游戏3")



[159]

=: if( d5== "✔" ) game_jumpto("159/") ;else game_jumpto("游戏1")

[159/]

=: if( d9== "" ) game_jumpto("胜利") ;else game_jumpto("游戏1")

[258]

=: if( d5== "" ) game_jumpto("258/") ;else game_jumpto("游戏1")

[258/]

=: if( d8== "" ) game_jumpto("胜利") ;else game_jumpto("游戏1")

[357]

=: if( d5== "" ) game_jumpto("357/") ;else game_jumpto("游戏1")

[357/]

=: if( d7== "" ) game_jumpto("胜利") ;else game_jumpto("游戏1")

[456]

=: if( d5== "" ) game_jumpto("456/") ;else game_jumpto("游戏1")

[456/]

=: if( d6== "" ) game_jumpto("胜利") ;else game_jumpto("游戏1")

[123]

=: if( d2== "" ) game_jumpto("123/") ;else game_jumpto("游戏2")

[123/]

=: if( d3== "" ) game_jumpto("胜利") ;else game_jumpto("游戏2")

[789/]

=: if( d8== "" ) game_jumpto("789/") ;else game_jumpto("游戏2")

[789/]

=: if( d9== "" ) game_jumpto("胜利") ;else game_jumpto("游戏2")

[147]

=: if( d1== "" ) game_jumpto("147/") ;else game_jumpto("游戏2")

[147/]

=: if( d7== "" ) game_jumpto("胜利") ;else game_jumpto("游戏2")

[369]

=: if( d3== "" ) game_jumpto("369/") ;else game_jumpto("游戏2")

[369/]

=: if( d9== "" ) game_jumpto("胜利") ;else game_jumpto("游戏2")

[胜利]

=:MD.胜利次数+=1
你胜利了。
跳:初始

[失败]

=:MD.失败次数+=1
你失败了。
跳:初始


星季,你这代码有点多哈...井字棋可以的,但是你机器人咋没点智商,赢得有点简单了吧,加油,可以改进一下

我也想有智商啊😯,然俄还没搞明白这个逻辑,只好把机器人出的逻辑弄成随机啦

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册