Blackjack: Difference between revisions

From TetrisWiki
Jump to navigation Jump to search
*>Tepples
(Blackjack is how to specify randomizers)
 
*>Tepples
(links to randomizer articles)
Line 1: Line 1:
'''Blackjack''' is a language to specify [[randomizer]]s, developed by TC forum members Lardarse and Tepples.
'''Blackjack''' is a language to specify [[Glossary#R|randomizers]], developed by TC forum members [[user:Lardarse|Lardarse]] and [[user:Tepples|Tepples]].
 
It is intended to be useful both for human beings to read and for computers to parse.
It is intended that future versions of [[Lockjaw]] will include a Blackjack interpreter.
It is intended that future versions of [[Lockjaw]] will include a Blackjack interpreter.


Line 18: Line 18:


== Examples ==
== Examples ==
;Random Generator
;[[Random Generator]]
:<code>bag of I,J,L,O,S,T,Z</code>
:<code>bag of I,J,L,O,S,T,Z</code>
;14-piece bag
;14-piece bag
Line 26: Line 26:
;Memoryless
;Memoryless
:<code>I,J,L,O,S,T,Z</code>
:<code>I,J,L,O,S,T,Z</code>
;Memoryless (Bombliss)
;Memoryless including small [[piece]]s
:<code>I,J,L,O,S,T,Z,I2,I3,L3</code>
:<code>I,J,L,O,S,T,Z,I2,I3,L3</code>
;Memoryless more difficult (10% I)
;Memoryless more difficult (10% I)
Line 36: Line 36:
;SZSZ alternating
;SZSZ alternating
:<code>S,Z with 1 history</code>  
:<code>S,Z with 1 history</code>  
;TGM1 randomizer
;[[TGM randomizer|TGM1 randomizer]]
:<code>I,J,L,O,S,T,Z with 4 history 4 rolls first I,J,L,T</code>
:<code>I,J,L,O,S,T,Z with 4 history 4 rolls first I,J,L,T</code>
;TGM2/3 randomizer
;[[TGM randomizer|TGM2/3 randomizer]]
:<code>I,J,L,O,S,T,Z with 4 history 6 rolls first I,J,L,T</code>
:<code>I,J,L,O,S,T,Z with 4 history 6 rolls first I,J,L,T</code>
;Lardarse's more difficult
;Lardarse's more difficult
:<code>5 bag of I,T,J,J,L,L,O,O,S,S,S,Z,Z,Z</code>
:<code>5 bag of I,T,J,J,L,L,O,O,S,S,S,Z,Z,Z</code>

Revision as of 18:32, 25 December 2006

Blackjack is a language to specify randomizers, developed by TC forum members Lardarse and Tepples. It is intended to be useful both for human beings to read and for computers to parse. It is intended that future versions of Lockjaw will include a Blackjack interpreter.

Syntax

list
Choose a piece at random from the comma-separated list and deal it. Equivalent to 1 bag of list.
bag of list
Make a bag of list and deal them all in random sequence, then reshuffle.
number bag of list
Make a bag of list and deal the first number in random sequence, then reshuffle.
list with len history
Keep a list called history of the last len pieces dealt. (Repeated pieces in list are separate pieces for purpose of the history.) Choose a piece at random from list which is not in history and deal it. Then put the piece in history and remove the oldest piece from history.
list with len history number rolls
Keep a list called history of the last len pieces dealt. (Repeated pieces in list are separate pieces for purpose of the history.) Up to number times, choose a piece at random from list, and if it is not in history, deal it. Otherwise, deal the last piece chosen. Then put the piece in history and remove the oldest piece from history.
spec first list
Follow spec, except choose the first piece from list.

Examples

Random Generator
bag of I,J,L,O,S,T,Z
14-piece bag
bag of I,I,J,J,L,L,O,O,S,S,T,T,Z,Z
14-piece bag, dealt halfway
7 bag of I,I,J,J,L,L,O,O,S,S,T,T,Z,Z
Memoryless
I,J,L,O,S,T,Z
Memoryless including small pieces
I,J,L,O,S,T,Z,I2,I3,L3
Memoryless more difficult (10% I)
I,I,J,J,J,L,L,L,O,O,O,S,S,S,T,T,T,Z,Z,Z
SZSZ
S,Z
Move to Back
I,J,L,O,S,T,Z with 4 history
SZSZ alternating
S,Z with 1 history
TGM1 randomizer
I,J,L,O,S,T,Z with 4 history 4 rolls first I,J,L,T
TGM2/3 randomizer
I,J,L,O,S,T,Z with 4 history 6 rolls first I,J,L,T
Lardarse's more difficult
5 bag of I,T,J,J,L,L,O,O,S,S,S,Z,Z,Z