1 / 2

hw7 決戰 21 點 (1/2)

hw7 決戰 21 點 (1/2). 繳交期限 : 6/17 20:00 執行順序 先發兩張牌給莊家 , 再發兩張牌給”你” 一方拿到 21 點就結束程式 詢問”你”是否還要補牌?沒爆就繼續詢問 閒家過五關則閒家贏 “你”補完換莊家補牌 , 莊家點數比你少就會補牌 如果莊家點數 >= “ 你”則莊家贏 僅需把 1 當作 1 點 , 10 點以上當作 10 點 Bonus1: 實作出以 AJQK 替代 1, 11, 12, 13 點 Bonus2: 實作出可以把 1 當 1, 10, 11 點. hw7 決戰 21 點 (2/2).

lowell
Télécharger la présentation

hw7 決戰 21 點 (1/2)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. hw7 決戰21點 (1/2) • 繳交期限: 6/17 20:00 • 執行順序 • 先發兩張牌給莊家, 再發兩張牌給”你” • 一方拿到21點就結束程式 • 詢問”你”是否還要補牌?沒爆就繼續詢問 • 閒家過五關則閒家贏 • “你”補完換莊家補牌, 莊家點數比你少就會補牌 • 如果莊家點數 >= “你”則莊家贏 • 僅需把1當作1點, 10點以上當作10點 • Bonus1: 實作出以AJQK替代1, 11, 12, 13點 • Bonus2: 實作出可以把1當1, 10, 11點

  2. hw7 決戰21點 (2/2) • 可能有的輸出: • 你還要牌嗎? (y/n) • 你爆點了!!莊家贏了!! • 恭喜你過五關!!你贏了!! • 莊家又拿到: [◆ 5] • 莊家爆點了!!你贏了!! • 你贏了!! • 莊家贏了!! • 執行結果:

More Related