帶有選項的功能


4

假設您要創建一個具有可選參數的函數。Maeder的著作《用Mathematica進行編程》(emem)涵蓋了直到第3版為止的廣泛主題,但此後有些事情發生了變化/發展。

那麼現在用於帶有可選參數的函數func[x, ...]的標準代碼是什麼?

0

Anywhere I've played, a hand with an incorrect number of cards can't win. So, no, your 4 of a kind would be a dead hand.

In some friendly home games, a hand with too few cards would be allowed to play.


4

Given the question, there's two sections of Robert's rules that seem to apply:

From "Draw High" (section 12), #5:

Five cards constitute a playing hand. Less than five cards for a player (other than the button) before action has been taken is a misdeal. If action has been taken, a player with fewer than five cards may draw the number of cards necessary to complete a five-card hand. The button may receive the fifth card even if action has taken place. More or fewer than five cards after the draw constitutes a fouled hand.

and

From General Poker Rules (section 3), Dead Hands 1.d:

Your hand is declared dead if; the hand does not contain the proper number of cards for that particular game (except at stud a hand missing the final card may be ruled live, and at lowball and draw high a hand with too few cards before the draw is live).

From that, I'd say your 4 card hand is dead.


0

In some variants of poker; players can legally end up with hands of different sizes (not in draw poker though). In that case the best 5-card hand wins, where a missing card card is ranked lower than a 2 for the purpose of comparing kickers.

So:

J♣ J♥ J♠ J⋄ 2♣beats

J♣ J♥ J♠ J⋄

and:

8♣ 8♥ 8♠ beats

7♣ 7♥ 7♠ 4♣ which beats

7♣ 7♥ 7♠ 3♣ 2♠ which beats

7♣ 7♥ 7♠ 3♣ which beats

7♣ 7♥ 7♠ 2♣ which beats

7♣ 7♥ 7♠