diff --git a/dist/tetrion.js b/dist/tetrion.js
index 1d2ed1c..a187e63 100644
--- a/dist/tetrion.js
+++ b/dist/tetrion.js
@@ -2421,7 +2421,7 @@ ShapeZR.prototype = {
clone.state = this.nextState(rotationDirection);
var i = 0;
if(rotationDirection == 1)
- i = 4;
+ i = 2;
for(; i < 5*4; i+=4)
{
var shiftX = this.rotationPoints[j][i];
@@ -2445,33 +2445,15 @@ ShapeZR.prototype = {
},
//Rotate shape
rotate: function(matrix) {
- // TODO: rest of pieces
- //if(this.flag == 'T' || this.flag == 'L')
+
this.kickShape(matrix, -1);
- //else if (isShapeCanMove(this, matrix, 'rotate')){
- //this.state = this.nextState(-1);
- //fix position if shape is out of right border
- //var right = this.getRight();
- //if ( right >= COLUMN_COUNT){
- // this.x -= right - COLUMN_COUNT + 1;
- //}
- /*var left = this.getLeft();
- if(left <= 0)
- this.x += 1;*/
- //}
+
},
//Rotate shape clockwise
rotateClockwise: function(matrix) {
- //if(this.flag == 'T')
+
this.kickShape(matrix, 1);
- //else if (isShapeCanMove(this, matrix, 'rotateclockwise')) {
- //this.state = this.nextState(1);
- //fix position if shape is out of right border
- //var right = this.getRight();
- //if (right >= COLUMN_COUNT) {
- // this.x -= right - COLUMN_COUNT + 1;
- //}
- //}
+
},
//Caculate the max column of the shape
getColumnCount: function() {
diff --git a/index.html b/index.html
index ab7adec..e6d2515 100644
--- a/index.html
+++ b/index.html
@@ -36,7 +36,7 @@
-
+
@@ -155,7 +155,7 @@ document.getElementById("divbg").removeAttribute("tabIndex");
document.getElementById("setMKOStackingVar").addEventListener("click", function() { tetrion.setCurrentOpener(3); } );
document.getElementById("setPokeminosSTDVar").addEventListener("click", function() { tetrion.setCurrentOpener(4); } );
document.getElementById("setMrTSpinsSTDreversedVar").addEventListener("click", function() { tetrion.setCurrentOpener(5); } );
- //document.getElementById("setHachispinVar").addEventListener("click", function() { tetrion.setCurrentOpener(6); } );
+ document.getElementById("setHachispinVar").addEventListener("click", function() { tetrion.setCurrentOpener(6); } );
document.getElementById("test").addEventListener("click", function() { tetrion.setDoTest(); } );
document.getElementById("settings").addEventListener("change", function() { tetrion.updateSettingTextBox(); } );
diff --git a/src/shapes.js b/src/shapes.js
index 8c073c2..97e5176 100644
--- a/src/shapes.js
+++ b/src/shapes.js
@@ -667,7 +667,7 @@ ShapeZR.prototype = {
clone.state = this.nextState(rotationDirection);
var i = 0;
if(rotationDirection == 1)
- i = 4;
+ i = 2;
for(; i < 5*4; i+=4)
{
var shiftX = this.rotationPoints[j][i];
@@ -691,33 +691,15 @@ ShapeZR.prototype = {
},
//Rotate shape
rotate: function(matrix) {
- // TODO: rest of pieces
- //if(this.flag == 'T' || this.flag == 'L')
+
this.kickShape(matrix, -1);
- //else if (isShapeCanMove(this, matrix, 'rotate')){
- //this.state = this.nextState(-1);
- //fix position if shape is out of right border
- //var right = this.getRight();
- //if ( right >= COLUMN_COUNT){
- // this.x -= right - COLUMN_COUNT + 1;
- //}
- /*var left = this.getLeft();
- if(left <= 0)
- this.x += 1;*/
- //}
+
},
//Rotate shape clockwise
rotateClockwise: function(matrix) {
- //if(this.flag == 'T')
+
this.kickShape(matrix, 1);
- //else if (isShapeCanMove(this, matrix, 'rotateclockwise')) {
- //this.state = this.nextState(1);
- //fix position if shape is out of right border
- //var right = this.getRight();
- //if (right >= COLUMN_COUNT) {
- // this.x -= right - COLUMN_COUNT + 1;
- //}
- //}
+
},
//Caculate the max column of the shape
getColumnCount: function() {