@@ -0,0 +1,787 @@
+var Tetrinimo = function(args) %7B%0A  this.element = args.element;%0A  var shape = args.shape;%0A%0A  this.blocks = shape.map(function(block) %7B%0A    return %7Bx: new Number(block.x), y: new Number(block.y)%7D;%0A  %7D);%0A%0A  this.row = 0;%0A  this.col = 5;%0A%0A  for(var block in this.blocks) %7B%0A    this.blocks%5Bblock%5D.y += this.row;%0A    this.blocks%5Bblock%5D.x += this.col;%0A  %7D%0A%7D%0ATetrinimo.prototype.raise = function() %7B%0A  this.row--;%0A  for(var block in this.blocks) %7B%0A    this.blocks%5Bblock%5D.y--;%0A  %7D%0A%7D;%0ATetrinimo.prototype.drop = function() %7B%0A  this.row++;%0A  for(var block in this.blocks) %7B%0A    this.blocks%5Bblock%5D.y++;%0A  %7D%0A%7D;%0Avar directToInt = %7B%0A  'left': -1,%0A  'right': 1%0A%7D;%0ATetrinimo.prototype.slide = function(direction) %7B%0A  this.blocks.forEach(function(block) %7B%0A    block.x += directToInt%5Bdirection%5D;%0A  %7D);%0A%7D;%0A

Add tetrinimo model to tetrinimo.js