Re: [VB6 ] 井字遊戲的勝負判定
: 推 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!
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
■ 蒙帝派松正體中文計畫 ■ http://www.youtube.com/user/JamesBondXD
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.115.206.108
推
05/17 14:12, , 1F
05/17 14:12, 1F
推
05/29 13:01, , 2F
05/29 13:01, 2F
→
06/03 23:09, , 3F
06/03 23:09, 3F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 4 之 6 篇):