# ========================================================================== # # rconfreegui $CFDG/tetris.cfdg # REALLY great way to make # Tetris graphics! # ========================================================================== # background { b -1 }

# startshape zag startshape T

# ========================================================================== # # Die Z Form # ========================================================================== # rule zag {

zig{flip 90 hue 40}

} rule zig {

brick{hue 200 sat 0.3}
brick{hue 200 sat 0.3 x 1.1}
brick{hue 200 sat 0.3 x 1.1 y 1.1}
brick{hue 200 sat 0.3 x 2.2 y 1.1}

} # ========================================================================== # # T Form # Note that each brick {} call defines one square of the whole shape. # ========================================================================== # rule T {

brick{hue 160 sat 0.3}
brick{hue 160 sat 0.3 x 1.1}
brick{hue 160 sat 0.3 x 2.2}
brick{hue 160 sat 0.3 x 1.1 y 1.1}

}

rule L {

brick{hue 120 sat 0.3}
brick{hue 120 sat 0.3 x 1.1}
brick{hue 120 sat 0.3 x 2.2}
brick{hue 120 sat 0.3 x 2.2 y 1.1}

}

rule line {

brick{hue 80 sat 0.3}
brick{hue 80 sat 0.3 x 1.1}
brick{hue 80 sat 0.3 x 2.2}
brick{hue 80 sat 0.3 x 3.3}

}

rule block {

brick{hue 20 sat 0.3}
brick{hue 20 sat 0.3 x 1.1}
brick{hue 20 sat 0.3 y 1.1}
brick{hue 20 sat 0.3 x 1.1 y 1.1}

}

rule brick {

square{b 0.5}

}

rule square {

SQUARE{}
SQUARE{s 0.8 b 1}

}

rule intersection4 {

corridor{}
corridor{r 90 y 2.2}
corridor{r -90 x 2.2 y 4.4}
corridor{y 4.4}

}

rule intersectionT {

corridor{}
corridor{r 90 y 2.2}
corridor{r -90 x 2.2 y 4.4}
wall{r -90 y 4.4}

}

rule deadEnd {

wall{}
wall{x 2.2}
wall{r 90 x 2.2 y 2.2}

}

rule corner {

wall{x 2.2}
wall{r 90 x 2.2 y 3.3}

}

rule corridor {

wall{}
wall{x 2.2}

}

rule wall {

brick{}
brick{y 1.1}
brick{y 2.2}

}

rule brick {

square{b 0.5}

}

rule square {

SQUARE{}
SQUARE{s 0.8 b 1}

}