Watch the bookie win When you roll a die, you have a 6:1 chance of any given option.

There's a bookmaker taking bets on die rolls. He owns £20 at the start of the game.

The bookmaker offers odds of 4:1, but gamblers take it, because there's money on offer.

There are 10 gamblers. A, B, C, D, E, F, G, H, I, and J. Each gambler owns 10 pounds sterling.

Each round, the 10 gamblers each bet £1 on a die roll, if they have any money left.


If they win their bet, £4 is transferred from the bookmaker to the gambler.
If they lose, £1 is transferred from the gambler to the bookmaker.


The game ends in either of these conditions:


The bookmaker runs out of money, or is in debt.
All of the gamblers have run out of money.


We should see the result presented as a series of tables, like so:

Turn 1
Roll: 2

|                | Bookie | A  | B  | C  | D  | E  | F  | G  | H  | I  | J  |
| Start money    | 20     | 10 | 10 | 10 | 10 | 10 | 10 | 10 | 10 | 10 | 10 |  
| Bet            | n/a    | 1  | 3  | 2  | 1  | 2  | 4  | 6  | 5  | 2  | 4  |
| Balance change | -2     | -1 | -1 | +3 | -1 | +3 | -1 | -1 | -1 | +3 | -1 |
| End money      | 18     | 9  | 9  | 13 | 9  | 13 | 9  | 9  | 9  | 13 | 9  |

Turn 2
Roll: 4

|                | Bookie | A  | B  | C  | D  | E  | F  | G  | H  | I  | J  |
| Start money    | 18     | 9  | 9  | 13 | 9  | 13 | 9  | 9  | 9  | 13 | 3  |  
| Bet            | n/a    | 1  | 2  | 3  | 4  | 5  | 6  | 1  | 2  | 3  | 4  |
| Balance change | +2     | -1 | -1 | -1 | +3 | -1 | -1 | -1 | -1 | -1 | +3 |
| End money      | 20     | 8  | 8  | 12 | 8  | 12 | 8  | 8  | 8  | 12 | 12 |


When a gambler runs out of money, they can't bet any more. Their bet is 0.

turn 20
roll: 5

|                | Bookie | A  | B  | C  | D  | E  | F  | G  | H  | I  | J  |
| Start money    | 180    | 3  | 1  | 12 | 4  | 0  | 1  | 3  | 6  | 23 | 1  |  
| Bet            | n/a    | 1  | 2  | 3  | 4  | 0  | 6  | 1  | 2  | 3  | 4  |
| Balance change | +2     | -1 | -1 | -1 | +3 | 0  | -1 | -1 | -1 | -1 | +3 |
| End money      | 20     | 8  | 8  | 12 | 8  | 0  | 8  | 8  | 8  | 12 | 12 |




Write some code to model this game, and display the results in a table:


Use any language
The gamblers can change their bet each turn, always bet on the same number, all bet on the same number. As long as each turn they bet on one number from 1 to 6.
The die roll must be a random integer from 1 to 6. Use a typical, vernacular definition of random.
The end money from one turn is the start money of the next turn.
The balance change for the bookie is the sum of the other balance changes.
Each turn your program should output:


Which turn we are on
The resulting die roll
The starting balance, die roll, balance change, and ending balance for the bookie and all ten gamblers, as an ascii table.

Attempt to do so in the fewest bytes.
JavaScript (Node.js), 548 516 511 485 453 397 396 392 372 325 323 260 bytes



f=(i=!(b=20,p=10))=&gt;b*p&gt;0?`T:${++i} R:${(r=0|Math.random()*6)+1}
|   |Book|A |B |C |D |E |F |G |H |I |J |
|Stt${(d=(n,s)=&gt;`|${n}`.padEnd(5)+`|${s}`.padEnd(3).repeat(10)+`|
`)(b,p)}|Bet${d('n/a',1)}|Chg${d(u=r?'+10':-40,v=r?-1:'+4')}|End`+d(b+=+u,p+=+v)+f(i):''


Try it online!

-32 something bytes by shortening row labels. Also fixed the dice roll being 0-5, not 1-6
-5 bytes by compacting output format
-26 bytes because padding
-32 bytes because whitespace is the devil
-56 bytes thanks to ASCII-only and Luis Felipe in chat
-1 byte because return x doesn't need to be on a new line
-4 bytes thanks to some small refactors from ASCII-only
-20 bytes thanks to more collaboration in chat and some changes by Kevin Cruijssen
-47 bytes because y was the devil and ASCII-only performed an exorcism
-2 bytes because ASCII-only is a golfing machine
-63 bytes thanks to the work of several people in the comments

The golf I took was calculated, but man am I bad at golf.

Almost looks like python rather than JS because where possible I used newlines in place of semicolons for readability.

All gamblers always bet on 1, so we only need to store 1 gambler balance (p), the bookie's balance is b.

Explanation time

I need to rewrite the explanation to match the 260 byte version, but check the revision history for the lengthy explanation of the 323 byte version.