Open kcwu229 opened 3 years ago
點解List items can be 9 at most, 上網查: On a regular 32bit system, this is (4294967295 / 2) / 4 or 536870912. Therefore the maximum size of a python list on a 32 bit system is 536,870,912 elements. 下面唔知你講乜
9 係指玩家最大數量 ,base on chum既 point
因為我set list叫player list 咁 list items 數量就對應返佢玩家數量, 所以係9
最初構思: Step 1) 玩家一開始input 既數字=玩家數量 E.g. Player 1, 2, 3, 4...9 Input number為 6 (6位玩家) List入面多出嚟既(player 7至9)pop 走佢
Step 2) 俾50chips入場費: 唔夠chips: foul 走player
Step 3) Move 數量取決於玩家數量 用if loop (if player x in list) 行動 起list 入面 = True > 有action If false (skip/ no action)
Step 4) Hit and Stand 階段 while loop: (len(list)) 用list items數量set 一個while loop:
each move can choose 1: hitNstand /surrender 當中Stand Surrender 會pop 走
2: bet (加注) A)Allin B)部分 C)唔bet
Move曬後, conclusion顯示 total number (chips) : conclusion
Step 5) 決定本局winner: Depends on points: Can have multi winners: 分chips rewards in average (according to players)
Chips = 0 既 foul走
Step 6 最後未被foul走既player: 本game final winner
Updated 整體構思+少少個人諗法 (樓上)
List items : can be 9 at most input number of players = real Player other players not used : pop
9 moves( due to numbers of real players) if loop (with xx in list ) if in (True)> run the move if false (skip/ not run)
while loop: (len(list)) each move ( 1): hitNstand & 入場 2: bet (加注: can be later consider), total number (chips) : conclusion winner can be > 1, chips rewards in average (according to players) 2a) Surrender - :Pop up