Tetris/Julia: Difference between revisions
Content added Content deleted
(Created page with "=={{header|Julia}}== <pre>#====== Julia-TETRIS: Features/Parameters ===================================== by Laszlo Hars, 10/21/2018 The game is played in...") |
|||
Line 113: | Line 113: | ||
<lang julia>using Random |
<lang julia>using Random |
||
struct B4 |
struct B4 |
||
bg::Int # ANSI code of |
bg::Int # ANSI code of tetromino color (bground of " ") |
||
d::Array{Int,2} # d[b,1:2] = row,col/2 offset of block b |
d::Array{Int,2} # d[b,1:2] = row,col/2 offset of block b |
||
# constructor: Z = B4(101,[0 0; 0 1; 1 1; 1 2]) |
# constructor: Z = B4(101,[0 0; 0 1; 1 1; 1 2]) |