pokeminos, fixes

pull/1/head
PolicyChanges1@gmail.com 2021-02-26 11:57:46 -05:00
parent 4ca9974dbf
commit dcbb9a1a39
4 changed files with 110 additions and 41 deletions

70
dist/tetrion.js vendored
View File

@ -880,28 +880,13 @@ Tetris.prototype = {
this.currentOpener = 0;
},
setTKIFonzieVar: function()
setCurrentOpener(opener)
{
this.isFreePlay = false;
this.doTest = false;
this.currentOpener = 1;
this.currentOpener = opener;
this._restartHandler();
},
setDTCannonVar: function()
{
this.isFreePlay = false;
this.doTest = false;
this.currentOpener = 2;
this._restartHandler();
},
setMKOStackingVar: function ()
{
this.isFreePlay = false;
this.doTest = false;
this.currentOpener = 3;
this._restartHandler();
},
setDoTest: function()
{
@ -1456,6 +1441,26 @@ var OpenerGenerator = {
shapes.getShape(4),
shapes.getShape(3));
break;
case 4:
//Pokemino's STD
this.shapeQueue = new Array(
shapes.getShape(0),
shapes.getShape(6),
shapes.getShape(1),
shapes.getShape(4),
shapes.getShape(2),
shapes.getShape(5),
shapes.getShape(3),
shapes.getShape(1),
shapes.getShape(5),
shapes.getShape(2),
shapes.getShape(0),
shapes.getShape(6),
shapes.getShape(2),
shapes.getShape(4),
shapes.getShape(3),
shapes.getShape(0),
shapes.getShape(3));
default:
return;
}
@ -1532,7 +1537,7 @@ var OpenerGenerator = {
}
break;
case 3:
//MKO Stacking // O - 1, I - 6, L - 0, S - 5, J - 4, Z - 2, T - 3
//MKO Stacking
this.hintQueue = new Array(
shapes.getShape(4),
shapes.getShape(5),
@ -1558,6 +1563,35 @@ var OpenerGenerator = {
this.hintQueue[i].state = this.hintQueue[i].nextState(hintDataList[i * 3 + 2]);
}
break;
case 4:
//Pokemino's STD // O - 1, I - 6, L - 0, S - 5, J - 4, Z - 2, T - 3
this.hintQueue = new Array(
shapes.getShape(0),
shapes.getShape(6),
shapes.getShape(1),
shapes.getShape(4),
shapes.getShape(2),
shapes.getShape(5),
shapes.getShape(3),
shapes.getShape(1),
shapes.getShape(5),
shapes.getShape(2),
shapes.getShape(0),
shapes.getShape(6),
shapes.getShape(2),
shapes.getShape(4),
shapes.getShape(3),
shapes.getShape(0),
shapes.getShape(3));
var hintDataList = [0,17,1, 0,16,0, 4,18,0, 4,17,-1, 3,15,1, 8,17,-1, 2,17,2, 0,17,0, 0,15,-1, 1,15,0, 8,16,-2, 6,15,0, 3,14,1, 6,12,-1, 6,16,1, 2,16,-1, 7,17,2 ];
for(var i = 0; i < this.hintQueue.length; i++) {
this.hintQueue[i].x = hintDataList[i * 3];
this.hintQueue[i].y = hintDataList[i * 3 + 1];
this.hintQueue[i].state = this.hintQueue[i].nextState(hintDataList[i * 3 + 2]);
}
break;
default:
return;
}

View File

@ -74,7 +74,7 @@ document.getElementById("divbg").removeAttribute("tabIndex");
<ul style="font-size:13px;color:dodgerblue;text-align:left;padding-left:1em;" id="EarlyLOrJPiece">Early L or J Piece:
<li style="font-size:12px;padding-left:1em";><a href="#" id="setDTCannonVar">DT Cannon (LS / JZ base)</a></li>
<li style="font-size:12px;padding-left:1em";><a href="#" id="setMKOStackingVar">MKO Stacking</a></li>
<li style="font-size:12px;padding-left:1em";><a href="#" id="setPokeminosSTD Var">Pokemino's STD </a></li>
<li style="font-size:12px;padding-left:1em";><a href="#" id="setPokeminosSTDVar">Pokemino's STD </a></li>
</ul>
<ul style="font-size:13px;color:dodgerblue;text-align:left;padding-left:1em;" id="EarlyLOrJPiece">Early O Piece:
<li style="font-size:12px;padding-left:1em";><a href="#" id="setMrTSpinsSTDreversedVar">Mr. T-Spin's STD (reversed) </a></li>
@ -136,7 +136,7 @@ document.getElementById("divbg").removeAttribute("tabIndex");
</select>
<input style="width:80px;font-size:13px;background:black;color:dodgerblue;text-align:left;" type="text" id="setting_value">
<input id="submitsetting" type="submit" value="Set Setting">
<input id="test" type="submit" value="Test">
<input id="test" type="submit" value="Test Yourself">
</div>
@ -150,9 +150,10 @@ document.getElementById("divbg").removeAttribute("tabIndex");
(function(){
var tetrion = new Tetris('tetris');
document.getElementById("setFreePlay").addEventListener("click", function() { tetrion.setFreePlay(); } );
document.getElementById("setTKIFonzieVar").addEventListener("click", function() { tetrion.setTKIFonzieVar(); } );
document.getElementById("setDTCannonVar").addEventListener("click", function() { tetrion.setDTCannonVar(); } );
document.getElementById("setMKOStackingVar").addEventListener("click", function() { tetrion.setMKOStackingVar(); } );
document.getElementById("setTKIFonzieVar").addEventListener("click", function() { tetrion.setCurrentOpener(1); } );
document.getElementById("setDTCannonVar").addEventListener("click", function() { tetrion.setCurrentOpener(2); } );
document.getElementById("setMKOStackingVar").addEventListener("click", function() { tetrion.setCurrentOpener(3); } );
document.getElementById("setPokeminosSTDVar").addEventListener("click", function() { tetrion.setCurrentOpener(4); } );
document.getElementById("test").addEventListener("click", function() { tetrion.setDoTest(); } );
document.getElementById("settings").addEventListener("change", function() { tetrion.updateSettingTextBox(); } );

View File

@ -179,28 +179,13 @@ Tetris.prototype = {
this.currentOpener = 0;
},
setTKIFonzieVar: function()
setCurrentOpener(opener)
{
this.isFreePlay = false;
this.doTest = false;
this.currentOpener = 1;
this.currentOpener = opener;
this._restartHandler();
},
setDTCannonVar: function()
{
this.isFreePlay = false;
this.doTest = false;
this.currentOpener = 2;
this._restartHandler();
},
setMKOStackingVar: function ()
{
this.isFreePlay = false;
this.doTest = false;
this.currentOpener = 3;
this._restartHandler();
},
setDoTest: function()
{

View File

@ -63,6 +63,26 @@ var OpenerGenerator = {
shapes.getShape(4),
shapes.getShape(3));
break;
case 4:
//Pokemino's STD
this.shapeQueue = new Array(
shapes.getShape(0),
shapes.getShape(6),
shapes.getShape(1),
shapes.getShape(4),
shapes.getShape(2),
shapes.getShape(5),
shapes.getShape(3),
shapes.getShape(1),
shapes.getShape(5),
shapes.getShape(2),
shapes.getShape(0),
shapes.getShape(6),
shapes.getShape(2),
shapes.getShape(4),
shapes.getShape(3),
shapes.getShape(0),
shapes.getShape(3));
default:
return;
}
@ -139,7 +159,7 @@ var OpenerGenerator = {
}
break;
case 3:
//MKO Stacking // O - 1, I - 6, L - 0, S - 5, J - 4, Z - 2, T - 3
//MKO Stacking
this.hintQueue = new Array(
shapes.getShape(4),
shapes.getShape(5),
@ -165,6 +185,35 @@ var OpenerGenerator = {
this.hintQueue[i].state = this.hintQueue[i].nextState(hintDataList[i * 3 + 2]);
}
break;
case 4:
//Pokemino's STD // O - 1, I - 6, L - 0, S - 5, J - 4, Z - 2, T - 3
this.hintQueue = new Array(
shapes.getShape(0),
shapes.getShape(6),
shapes.getShape(1),
shapes.getShape(4),
shapes.getShape(2),
shapes.getShape(5),
shapes.getShape(3),
shapes.getShape(1),
shapes.getShape(5),
shapes.getShape(2),
shapes.getShape(0),
shapes.getShape(6),
shapes.getShape(2),
shapes.getShape(4),
shapes.getShape(3),
shapes.getShape(0),
shapes.getShape(3));
var hintDataList = [0,17,1, 0,16,0, 4,18,0, 4,17,-1, 3,15,1, 8,17,-1, 2,17,2, 0,17,0, 0,15,-1, 1,15,0, 8,16,-2, 6,15,0, 3,14,1, 6,12,-1, 6,16,1, 2,16,-1, 7,17,2 ];
for(var i = 0; i < this.hintQueue.length; i++) {
this.hintQueue[i].x = hintDataList[i * 3];
this.hintQueue[i].y = hintDataList[i * 3 + 1];
this.hintQueue[i].state = this.hintQueue[i].nextState(hintDataList[i * 3 + 2]);
}
break;
default:
return;
}