I am trying to write a miniature version of Tetris that adheres to the Tetris guidelines as much as possible:
To be precise I want the complete game to be constructed of as little as possible 140 byte javascript. The first 140 byte script should return an array with 112 integer values that represent the 4 rows of the 7 tetrominos in each of the 4 rotated positions. The exact position order of the rotations is very important.
I got as far as putting the data in 16bit unicode characters (they count as 2 bytes though) and unpacking in just over 140 bytes.
Does anyone know a clever way of constructing this array?
var s="ༀ∢ð䑄࣠لâьˠцèౄ٠٠٠٠ۀѢlࣄӠѤäӄౠɤÆӈ",m=[];for(i=0;i<28;i++){c=s.charCodeAt(i);for(j=4;j>0;){m.push(c>>(4*--j)&15)}return m}
    I tetrimino
    Spawn         Rotate90      Rotate180     Rotate270
    ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐
    │ │ │ │ │     │ │ │■│ │     │ │ │ │ │     │ │■│ │ │
    ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤
    │■│■│■│■│     │ │ │■│ │     │ │ │ │ │     │ │■│ │ │
    ├─┼─○─┼─┤     ├─┼─○─┼─┤     ├─┼─○─┼─┤     ├─┼─○─┼─┤
    │ │ │ │ │     │ │ │■│ │     │■│■│■│■│     │ │■│ │ │
    ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤
    │ │ │ │ │     │ │ │■│ │     │ │ │ │ │     │ │■│ │ │
    └─┴─┴─┴─┘     └─┴─┴─┴─┘     └─┴─┴─┴─┘     └─┴─┴─┴─┘
    Hex: 0F00     Hex: 2222     Hex: 00F0     Hex: 4444
     J tetrimino
     Spawn         Rotate90      Rotate180     Rotate270
    ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐
    │ │ │ │ │     │ │ │ │ │     │ │ │ │ │     │ │ │ │ │
    ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤
    │■│ │ │ │     │ │■│■│ │     │ │ │ │ │     │ │■│ │ │
    ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤
    │■│●│■│ │     │ │●│ │ │     │■│●│■│ │     │ │●│ │ │
    ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤
    │ │ │ │ │     │ │■│ │ │     │ │ │■│ │     │■│■│ │ │
    └─┴─┴─┴─┘     └─┴─┴─┴─┘     └─┴─┴─┴─┘     └─┴─┴─┴─┘
    Hex: 08E0     Hex: 0644     Hex: 00E2     Hex: 044C
     L tetrimino
     Spawn         Rotate90      Rotate180     Rotate270
    ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐
    │ │ │ │ │     │ │ │ │ │     │ │ │ │ │     │ │ │ │ │
    ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤
    │ │ │■│ │     │ │■│ │ │     │ │ │ │ │     │■│■│ │ │
    ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤
    │■│●│■│ │     │ │●│ │ │     │■│●│■│ │     │ │●│ │ │
    ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤
    │ │ │ │ │     │ │■│■│ │     │■│ │ │ │     │ │■│ │ │
    └─┴─┴─┴─┘     └─┴─┴─┴─┘     └─┴─┴─┴─┘     └─┴─┴─┴─┘
    Hex: 02E0     Hex: 0446     Hex: 00E8     Hex: 0C44
     O tetrimino
     Spawn         Rotate90      Rotate180     Rotate270
    ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐
    │ │ │ │ │     │ │ │ │ │     │ │ │ │ │     │ │ │ │ │
    ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤
    │ │■│■│ │     │ │■│■│ │     │ │■│■│ │     │ │■│■│ │
    ├─┼─○─┼─┤     ├─┼─○─┼─┤     ├─┼─○─┼─┤     ├─┼─○─┼─┤
    │ │■│■│ │     │ │■│■│ │     │ │■│■│ │     │ │■│■│ │
    ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤
    │ │ │ │ │     │ │ │ │ │     │ │ │ │ │     │ │ │ │ │
    └─┴─┴─┴─┘     └─┴─┴─┴─┘     └─┴─┴─┴─┘     └─┴─┴─┴─┘
    Hex: 0660     Hex: 0660     Hex: 0660     Hex: 0660
     S tetrimino
     Spawn         Rotate90      Rotate180     Rotate270
    ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐
    │ │ │ │ │     │ │ │ │ │     │ │ │ │ │     │ │ │ │ │
    ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤
    │ │■│■│ │     │ │■│ │ │     │ │ │ │ │     │■│ │ │ │
    ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤
    │■│●│ │ │     │ │●│■│ │     │ │●│■│ │     │■│●│ │ │
    ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤
    │ │ │ │ │     │ │ │■│ │     │■│■│ │ │     │ │■│ │ │
    └─┴─┴─┴─┘     └─┴─┴─┴─┘     └─┴─┴─┴─┘     └─┴─┴─┴─┘
    Hex: 06C0     Hex: 0462     Hex: 006C     Hex: 08C4
     T tetrimino
     Spawn         Rotate90      Rotate180     Rotate270
    ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐
    │ │ │ │ │     │ │ │ │ │     │ │ │ │ │     │ │ │ │ │
    ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤
    │ │■│ │ │     │ │■│ │ │     │ │ │ │ │     │ │■│ │ │
    ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤
    │■│●│■│ │     │ │●│■│ │     │■│●│■│ │     │■│●│ │ │
    ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤
    │ │ │ │ │     │ │■│ │ │     │ │■│ │ │     │ │■│ │ │
    └─┴─┴─┴─┘     └─┴─┴─┴─┘     └─┴─┴─┴─┘     └─┴─┴─┴─┘
    Hex: 04E0     Hex: 0464     Hex: 00E4     Hex: 04C4
     Z tetrimino
     Spawn         Rotate90      Rotate180     Rotate270
    ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐     ┌─┬─┬─┬─┐
    │ │ │ │ │     │ │ │ │ │     │ │ │ │ │     │ │ │ │ │
    ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤
    │■│■│ │ │     │ │ │■│ │     │ │ │ │ │     │ │■│ │ │
    ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤
    │ │●│■│ │     │ │●│■│ │     │■│●│ │ │     │■│●│ │ │
    ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤     ├─┼─┼─┼─┤
    │ │ │ │ │     │ │■│ │ │     │ │■│■│ │     │■│ │ │ │
    └─┴─┴─┴─┘     └─┴─┴─┴─┘     └─┴─┴─┴─┘     └─┴─┴─┴─┘
    Hex: 0C60     Hex: 0264     Hex: 00C6     Hex: 04C8
 
     
    