#!/usr/bin/python
# -*- coding: utf-8 -*-
# A simple japanese game for irc.
# mongoose at icculus dot org
#############################################################
#Cho-han bakuchi
#From Wikipedia, the free encyclopedia
#
#Cho-Han Bakuchi (or Cho Ka Han Ka, or simply Cho-Han) is a traditional Japanese gambling game using dice.
#
#The game uses two standard six-sided dice, which are shaken in a bamboo cup or bowl by a dealer. The cup is then overturned onto the floor. Players then place their wagers on whether the sum total of numbers showing on the two dice will be "Cho" (even) or "Han" (odd). The dealer then removes the cup, displaying the dice. The winners collect their money.
#
#Depending on the situation, the dealer will sometimes act as the house, collecting all losing bets. But more often, the players will bet against each other (this requires an equal number of players betting on odd and even) and the house will collect a set percentage off winning bets.
#
#The game was a mainstay of the bakuto, itinerant gamblers in old Japan, and is still played by the modern yakuza. In a traditional Cho-Han setting, players sit on a tatami floor. The dealer sits in the formal seiza position and is often shirtless (to prevent accusations of cheating), exposing his elaborate tattoos.
import random
random.seed()
dieFace = [ '⚀', '⚁', '⚂', '⚃', '⚄', '⚅' ]
def cho_han_bakuchi():
# Get dice
die1 = random.randrange(1, 6)
die2 = random.randrange(1, 6)
total = die1 + die2;
s = dieFace[die1-1] + " %d " % (die1) + dieFace[die2-1] + " %d " % (die2)
if total % 2:
s += " Han"
else:
s += " Cho"
print s
return
if __name__ == "__main__":
cho_han_bakuchi()