看板 Yup99-03 關於我們 聯絡資訊
※ 引述《Willman (我要結婚了!!!)》之銘言: : : 資工..... : : 他之前就做了一個麻將的遊戲.... : 那電腦輸了會怎樣嗎? 羞 ~~~ : : 可以跟電腦玩... : : 當然電腦的AI也是他自己寫的.... : ^^^^^^^^ --> 希望強哥能給賞 Demo || how-to 給我們觀摩學習阿 ! : : 他的目標是RPG.... 其實超強的AI不會很難做 請參考下演算法 Algorithm of 超強AI { Function 發牌 { If 發給玩家 then 只發奇數(1,3,5,7,9)Or偶數(2,4,6,8) And 不重覆之牌型 ElseIf 發給電腦 then 從下列牌組中任意挑一組發出 牌組[] = {四暗刻, 大四囍, 清一色, 九蓮寶燈,......} End If } Function 丟牌 { If 電腦所丟之廢牌為玩家所聽之牌 Then Format c: Else 丟出該廢牌 End if } Function 發牌 { If 所發給玩家之牌為該玩家所聽之牌 then Crash the CPU and MAINBOARD Else 發牌給玩家 End If } Function 破關 { If 玩家破關 then The naked programmer will bump into your room End If } } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.62.94.252