- 有四顆骰子,骰子的點數為 1~6
- 規則:
- 以所得點數大小與分勝負。
- 計點方式係先扣除2顆點數相同的骰子,其餘2顆點數合計即為其所得點數。
- 若有兩組骰子點數相同,則以點數較大者之合計為其所得點數。
- 若所擲骰子正面均不相同,稱為「無面」或「無點」,則沒有點數。
- 有3顆骰子相同且另一顆不同,沒有點數。
- 因此,所得點數最大為12點,稱為「十八」(si̍p-pat);最小為3點,漢字為「扁膣」,發音類似BG,為賭徒賭輸,生氣怒罵用語。
- 若四顆骰子正面均相同,稱為「一色」(外省人稱豹子),不論點數多寡,均以勝計。
- 若玩家們同時有多個「一色」,大小順序比較:1 > 4 > 6 > 5 > 3 > 2。
- 若玩家們同時有多個相同點數,以點數合中單顆最大的爲勝。
- 若經過上面規則玩家點數仍相同,則和局。
- 牌型有下列幾種(大小順序由上而下):
- all of a kind (一色): 四顆骰子點數一樣,如 2 2 2 2,如 6 6 6 6
- 兩個 all of a kind 大小順序比較:1 > 4 > 6 > 5 > 3 > 2
- normal point: 2顆點數一樣的骰子成對,另外2顆點數和即為 sum,例如 5 3 5 4 為 7 點, 6 6 2 3 為 5 點。
- 兩個 normal point 比較大小:若 2 顆骰子點數的和(sum) 一樣,則比較用來加總點數較大的那顆骰子點數,例如 5 5 3 4 為 4+3 等於 7 點,而 2 2 6 1 為 6+1 等於 7 點,則 2 2 6 1 > 5 5 3 4,因為 6 > 4。
- no point: 4 顆骰子點數都不一樣,或是 有 3 顆骰子點數一樣。
- 兩個 no point 一樣大,平手。
- all of a kind (一色): 四顆骰子點數一樣,如 2 2 2 2,如 6 6 6 6
- test cases 舉例
- 範例1:
- Black: 5 3 5 4 White: 2 6 2 3
- White win. - with normal point: 9
- 範例2:
- Black: 5 5 5 5 White: 2 6 2 3
- Black win. - with all of a kind: 5
- 範例3:
- Black: 3 5 5 5 White: 4 1 4 2
- White win. - with normal point: 3
- 範例4:
- Black: 3 4 5 5 White: 4 1 4 6
- White win. - with normal point: 7
- 範例5:
- Black: 3 5 5 5 White: 4 1 3 6
- Tie.
- 範例6:
- Black: 3 6 5 5 White: 4 4 3 6
- Tie.
- 範例1:
classic-tdd-sibala's Introduction
classic-tdd-sibala's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.