Bridge Routine

Bridge Routine

Simple

桥牌的取巧能力是通过Milton Work point count 估算的,我们将使用一个简单的版本,适合Pythonbridge 游戏的初学者!

桥牌由十三张牌组成,如图所示 (rank, suit):

  • 每张ace 得 4 分,每张king 得 3 分,每张queen 得 2 分,每张jack 得 1 分。然后按以下规则调整原始点数
  • 如果牌局中包含一种 4 张牌和三种 3 张牌的花色,则减去 1 分,因为它是flat(平手牌很少能与非平手牌的点数相同的牌局打得一样好)。
  • 每种花色有 5 张牌加 1 分,每种花色有 6 张牌加 2 分,每种花色有 7 张牌或以上加 3 分。(形状是宣牌者的力量)。
  • 如果trump 不是"notrump" ,则每套void (即没有任何牌的花色)加 5 点,每套singleton (即正好有一张牌的花色)加 3 点,这两点都适用于trump 以外的任何其他花色。(空张和单张在你打花色契约时非常好,但在非双陆契约中却非常不好。当然,王牌花色中的空张或单张是非常糟糕的!)。

手牌通常以缩略形式给出,使其相关方面更容易一目了然。在这种缩写速记形式中,花色总是按照spades, hearts, diamonds, clubs 的顺序排列,因此不需要特殊符号来表示哪一种花色是哪一种。每种花色的等级都以字母形式列出,从"AKQJ"aces, faces ,所有低于jackspot 牌都写成相同的字母"x" ,以表示其确切的点值与该手牌的打法无关。这些字母必须按等级从低到高的顺序排列 AKQJx。如果某花色是void ,即牌局中没有该花色的牌,则该花色用减号"-"缩写。各花色的缩写形式之间用单倍空格分隔,不留空白。

您的函数必须返回给定牌局的点数和速记形式。

You should be an authorized user in order to see the full description and start solving this mission.
Settings
Code:
Other:
Invalid hot key. Each hot key should be unique and valid
Hot keys:
CheckiO Extensions

CheckiO Extensions allow you to use local files to solve missions. More info in a blog post.

In order to install CheckiO client you'll need installed Python (version at least 3.8)

Install CheckiO Client first:

pip3 install checkio_client

Configure your tool

checkio --domain=py config --key=

Sync solutions into your local folder

checkio sync

(in beta testing) Launch local server so your browser can use it and sync solution between local file end extension on the fly. (doesn't work for safari)

checkio serv -d

Alternatevly, you can install Chrome extension or FF addon

checkio install-plugin
checkio install-plugin --ff
checkio install-plugin --chromium

Read more here about other functionality that the checkio client provides. Feel free to submit an issue in case of any difficulties.

Pair Programming (Beta-version)

Welcome to Pair Programming! Engage in real-time collaboration on coding projects by starting a session and sharing the provided unique URL with friends or colleagues. This feature is perfect for joint project development, debugging, or learning new skills together. Simply click 'Start Session' to begin your collaborative coding journey!

Waiting for Pair Programming to start...

You are trying to join a pair programming session that has not started yet.

Please wait for the session creator to join.

Waiting for Pair Programming to reconnect...

It looks like the creator of the pair programming session closed the editor window.

It might happen accidentally, so that you can wait for reconnection.

×
 
 
<< <
> >>
exec show

Whats Next?

Free accounts will see Best CheckiO solutions with some delay.
Best Solutions will be opened in a moment
Become Awesome and Don't wait
The next stage is ""
Will be activated in
View More Solutions Random Review Solutions Go to the next mission