nes-tetris-representation
Version:
A set of types and classes that represent the pieces, movement, and rng of NES Tetris
42 lines (41 loc) • 1.75 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BlockValue = exports.Orientation = exports.PieceList = exports.Piece = void 0;
var Piece;
(function (Piece) {
Piece[Piece["I"] = 0] = "I";
Piece[Piece["O"] = 1] = "O";
Piece[Piece["T"] = 2] = "T";
Piece[Piece["J"] = 3] = "J";
Piece[Piece["L"] = 4] = "L";
Piece[Piece["S"] = 5] = "S";
Piece[Piece["Z"] = 6] = "Z";
})(Piece = exports.Piece || (exports.Piece = {}));
exports.PieceList = [
{ value: Piece.I, label: 'I' },
{ value: Piece.O, label: 'O' },
{ value: Piece.T, label: 'T' },
{ value: Piece.J, label: 'J' },
{ value: Piece.L, label: 'L' },
{ value: Piece.S, label: 'S' },
{ value: Piece.Z, label: 'Z' },
];
var Orientation;
(function (Orientation) {
Orientation[Orientation["Down"] = 0] = "Down";
Orientation[Orientation["Right"] = 1] = "Right";
Orientation[Orientation["Up"] = 2] = "Up";
Orientation[Orientation["Left"] = 3] = "Left";
})(Orientation = exports.Orientation || (exports.Orientation = {}));
;
// Yeah, yeah, transparent's not a real thing. But I'm gonna use it in so many places that I'm putting it here!
var BlockValue;
(function (BlockValue) {
BlockValue[BlockValue["EMPTY"] = 0] = "EMPTY";
BlockValue[BlockValue["ACTIVE_1"] = 1] = "ACTIVE_1";
BlockValue[BlockValue["ACTIVE_2"] = 2] = "ACTIVE_2";
BlockValue[BlockValue["ACTIVE_3"] = 3] = "ACTIVE_3";
BlockValue[BlockValue["TRANSPARENT_1"] = 4] = "TRANSPARENT_1";
BlockValue[BlockValue["TRANSPARENT_2"] = 5] = "TRANSPARENT_2";
BlockValue[BlockValue["TRANSPARENT_3"] = 6] = "TRANSPARENT_3";
})(BlockValue = exports.BlockValue || (exports.BlockValue = {}));