作者MOONRAKER (㊣乌笨秃,又笨又秃)
看板Visual_Basic
标题Re: [VB6 ] 井字游戏的胜负判定
时间Sat May 17 11:10:32 2008
: 推 xtimer:阿哩...看了两个小时....还是看不懂= =
: → xtimer:好复杂~@@
没概念就硬干啦,不要自找麻烦了
if button1.text = button2.text and button 2.text=button3.text then
...
else if button4.text = button5.text and button5.text=button6.text then
...
else if ...
...
end if
才八个状况,八组判断,一共就16项,有什麽好怕的
一开始没写阵列,现在加上去也不会比较简单
有阵列也只是好一点而已
if tictac(0,0) = tictac(0,1) and tictac(0,1) = tictac(0,2) then
...
else if tictac(1,0) = tictac(1,1) and tictac(1,1) = tictac(1,2) then
...
else if ...
...
end if
新手不用想那麽多,硬干出来就对了
等你硬干到很烦很烦的时候,自然会体会出其他tricky的写法
--
Batch 2 update (5/10) -
西班牙宗教审讯 -
主教 -
地狱阿婆 -
AND LOTS MORE
Unleashed Pythonesque pleasure, fully l10n'ed for Traditional Chinese
Spam-a-lot and prosper with the Monty Python!
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
■ 蒙帝派松正体中文计画 ■ https://www.youtube.com/user/JamesBondXD
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 59.115.206.108
1F:推 icehunter:推 05/17 14:12
2F:推 weibld:以前我写不出来都是用硬干的 = ="。反正程式小,跑起来也快 05/29 13:01
3F:→ MOONRAKER:硬干出来其实也没多长,但是想的时候总觉得很长很难 XD 06/03 23:09