Skip to content

acquiro/Shut_The_Box

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 

Repository files navigation

Shut_The_Box

Iron Scripter Challenge 05/26/2021 https://ironscripter.us/lets-play-a-powershell-game/

Project isn't finished yet. This is only the v3.

Many improvements are still to be added to this project.

The ASCII dice generator is a tweak to another Redditor I can't find the name back.

I ended up using this method as his ASCII was far better than mine and allows to print all of the dice on the "same line".

Thanks to PeterJoAl from Reddit for his help to come accross a clean way to get all of the possible combinations.

My first attempt was quite an ugly mess of loops.

RULES

Shut the box, also called Blitz, Canoga, klackers, batten down the hatches, kingoball, trictrac, cut throat, fork your neighbor, and jackpot, is a game of dice for one or more players, commonly played in a group of two to four for stakes.

Traditionally, a counting box is used with tiles numbered 1 to 9 where each can be covered with a hinged or sliding mechanism, though the game can be played with only a pair of dice, pen, and paper. Variations exist where the box has 10 or 12 tiles.

At the start of the game all levers or tiles are "open", showing the numerals 1 to 9.

During the game, each player plays in turn. A player begins their turn by throwing or rolling the die or dice into the box. If all of the remaining tiles show 6 or lower, the player may roll only one die, otherwise, the player must roll both dice.

After throwing, the player adds up the dot) on the dice and then "shuts" one of any combination of open numbers that sums to the total number of dots showing on the dice.

For example, if the total number of dots is 8, the player may choose any of the following sets of numbers as long as all of the numbers in the set are available to be covered:

8
7, 1
6, 2
5, 3
5, 2, 1
4, 3, 1

The player then rolls the dice again, aiming to shut more numbers. The player continues throwing the dice and shutting numbers until reaching a point at which, given the results produced by the dice, the player cannot shut any more numbers.

At that point, the player scores the sum of the numbers that are still uncovered. For example, if the numbers 2, 3, and 5 are still open when the player throws a one, the player's score is 10 (2 + 3 + 5 = 10).

Play then passes to the next player.

After every player has taken a turn, the player with the lowest score wins.

If a player succeeds in closing all of the numbers, that player is said to have "Shut the Box" – the player wins immediately and the game is over.

About

Iron Scripter Challenge 05/26/2021

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published