• Games Of Chance

Hello, fellow gamblers!,

Today we present our newest chance based mission: "Texas Referee": It is based on idea, suggested by one of our players in Mission Ideas forum thread:

Texas hold'em is a variation of the standard card game of poker. Two cards are dealt face down to each player and then five community cards are placed face-up by the dealer. With these cards, we need to define what combination a player has.

You are given a sequence of 7 cards and you should choose the best hand (5 cards) in it. Card sequences are described as strings, where each card are defined by two factors: rank and suit. Cards are separated by commas.

Your goal is to choose the best 5 card hand and return them as a string in order from the highest to lowest.

Hopefully you'll enjoy this mission as much as we've enjoyed building it for you!

But that's not all! We have even more gambling games in the CiO vaults which you may have missed, so here's a few from the list:

Place Queens: In this task, you should place eight chess Queens on an 8×8 chessboard so that no two Queens threaten each other. In addition, each Queen may be considered as part of it’s army, meaning every Queen could possible be a threat to every other Queen on the board.
Poker Dice: This task involves rolling 5 poker dices. After a roll you can choose to keep some of the dice and reroll the others. After two rerolls, you must choose which category to place your score in. After all of the categories have been scored, you add everything up to determine your final score.
Magic domino: The goal of solitaire is to build a Magic square with Double Six domino tiles.
Battle Dice: In this mission, you need to figure out what your probability of winning a board game is. The game involves two players moving units around a map. When the units battle and both players roll several dice, one for each unit, to see who wins and at what cost.
Mathematically Lucky Tickets: The "Mathematically lucky tickets" concept is similar to the idea of the Russian "Lucky tickets". It refers to the old public transport tickets that had 6-digit numbers printed on them. The ticket is considered mathematically lucky if no combination of its digits evaluates to 100.
Expected Dice: In this task, you'll be playing some classic tabletop games. Or rather, you're going to be, but first you'd like to know more about the probabilities involved in dice rolling.

+ BONUS

A one-line realization of slot-machine (с) Arunrocks

python -c "import random;p=lambda:random.choice('7♪♫♣♠♦♥◄☼☽');[print('|'.join([p(),p(),p()]),end='\r') for i in range(8**5)]"

As always, we'd love to hear your feedback and next article ideas!

Happy coding!

Welcome to CheckiO - games for coders where you can improve your codings skills.

The main idea behind these games is to give you the opportunity to learn by exchanging experience with the rest of the community. Every day we are trying to find interesting solutions for you to help you become a better coder.

Join the Game