⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ptetrics.java~146~

📁 JBuilder实现的具有单机
💻 JAVA~146~
📖 第 1 页 / 共 5 页
字号:
                  break stop;
                }


                 else if(nCol<8&&checklocal(nRow,nCol)&&checklocal(nRow,nCol+1)
                         &&!checklocal(nRow,nCol+2)
                         &&check_movedown(nCol,nCol+2,nRow+1)
                         &&check_moveline(nCol+2,nCol+2,nRow)&&check_moveline(nCol,nCol+2,nRow+1))
                 {
                   after_rotate = this.c_curPiece[0].m_nColumn;
                   if(nCol<after_rotate)
                     move_to_left(after_rotate-1,nCol);
                   else
                     move_to_right(after_rotate-1,nCol);

                   break stop;
                 }

                  else if(nCol<8&&checklocal(nRow,nCol)&&checklocal(nRow,nCol+1)
                    &&!checklocal(nRow,nCol+2)&&checkdown(nRow,nCol+2)
                    &&check_movedown(nCol,nCol+2,nRow+1))
                 {
                   after_rotate = this.c_curPiece[0].m_nColumn;
                   if(nCol<after_rotate)
                     move_to_left(after_rotate-1,nCol);
                   else
                     move_to_right(after_rotate-1,nCol);

                   break stop;
                 }
                 else if(nCol<9&&checkleft(nRow,nCol)&&checkright(nRow,nCol)
                   &&checkleft(nRow+1,nCol)&&checkright(nRow+1,nCol)&&
                   !checklocal(nRow,nCol)&&!checklocal(nRow+1,nCol)
                   &&check_movedown(nCol,nCol+1,nRow+2)
                   &&checkdown(nRow,nCol))
                {
                  cmoveCurPiece(0, 0, true);repaint();
                  after_rotate = this.c_curPiece[0].m_nColumn;
                   if(nCol<after_rotate)
                     move_to_left(after_rotate,nCol);
                   else
                     move_to_right(after_rotate,nCol);

                  break stop;
                }

                  else if(nCol<8&&checklocal(nRow,nCol)&&checklocal(nRow,nCol+1)
                    &&!checklocal(nRow,nCol+2)
                    &&check_movedown(nCol,nCol+2,nRow+1))
                 {
                   after_rotate = this.c_curPiece[0].m_nColumn;
                   if(nCol<after_rotate)
                     move_to_left(after_rotate-1,nCol);
                   else
                     move_to_right(after_rotate-1,nCol);

                   break stop;
                 }
                 else if(nCol<9&&checkleft(nRow,nCol)&&checkright(nRow,nCol)
                   &&checkleft(nRow+1,nCol)&&checkright(nRow+1,nCol)&&
                   !checklocal(nRow,nCol)&&!checklocal(nRow+1,nCol)
                   &&check_movedown(nCol,nCol+1,nRow+2))
                {
                  cmoveCurPiece(0, 0, true);repaint();
                  after_rotate = this.c_curPiece[0].m_nColumn;
                   if(nCol<after_rotate)
                     move_to_left(after_rotate,nCol);
                   else
                     move_to_right(after_rotate,nCol);

                break stop;
                }

                else if(nCol<8&&checkleft(nRow+1,nCol)&&checkleft(nRow+2,nCol)&&
                        checklocal(nRow,nCol)&&checklocal(nRow,nCol+1)
                        &&checklocal(nRow,nCol+2)
                        &&check_movedown(nCol,nCol+2,nRow+1))
                {
                  cmoveCurPiece(0, 0, true);repaint();
                  cmoveCurPiece(0, 0, true);repaint();
                  after_rotate = this.c_curPiece[0].m_nColumn;
                       if(nCol<after_rotate)
                         move_to_left(after_rotate-1,nCol);
                       else
                         move_to_right(after_rotate-1,nCol);

                break stop;
                }

                else if(nCol<8&&checklocal(nRow,nCol)&&checklocal(nRow,nCol+1)
                        &&checklocal(nRow,nCol+2)&&
                        check_movedown(nCol,nCol+2,nRow+1))
                {
                  cmoveCurPiece(0, 0, true);repaint();
                  cmoveCurPiece(0, 0, true);repaint();
                  after_rotate = this.c_curPiece[0].m_nColumn;
                       if(nCol<after_rotate)
                         move_to_left(after_rotate-1,nCol);
                       else
                         move_to_right(after_rotate-1,nCol);

                break stop;
                }

                else if(nCol>0&&checkright(nRow+1,nCol)&&checkright(nRow+2,nCol)
                  &&checklocal(nRow,nCol)&&checklocal(nRow,nCol-1)
                  &&check_movedown(nCol-1,nCol,nRow+1))
               {
                  cmoveCurPiece(0, 0, true);repaint();
                  cmoveCurPiece(0, 0, true);repaint();
                  cmoveCurPiece(0, 0, true);repaint();
                  after_rotate = this.c_curPiece[0].m_nColumn;
                       if(nCol<after_rotate)
                         move_to_left(after_rotate,nCol);
                       else
                         move_to_right(after_rotate,nCol);

                break stop;
               }
               else if(nCol>0&&checklocal(nRow,nCol)&&checklocal(nRow,nCol-1)
                   &&check_movedown(nCol-1,nCol,nRow+1))
               {
                  cmoveCurPiece(0, 0, true);repaint();
                  cmoveCurPiece(0, 0, true);repaint();
                  cmoveCurPiece(0, 0, true);repaint();
                  after_rotate = this.c_curPiece[0].m_nColumn;
                       if(nCol<after_rotate)
                         move_to_left(after_rotate,nCol);
                       else
                         move_to_right(after_rotate,nCol);
               break stop;
               }

               else if(nRow==0){
                  if (this.isWide_num(0, nCol, 3)&&check_movedown(nCol,nCol+2,1)) {
                    cmoveCurPiece(0, 0, true);repaint();
                    cmoveCurPiece(0, 0, true);repaint();
                    after_rotate = this.c_curPiece[0].m_nColumn;

                    if (nCol < after_rotate)
                      move_to_left(after_rotate-1, nCol);
                    else
                      move_to_right(after_rotate-1, nCol);
                    break stop;
                  }
                  if (this.isWide_num(0, nCol, 2)&&check_movedown(nCol,nCol+1,1)) {
                    cmoveCurPiece(0, 0, true);repaint();
                    cmoveCurPiece(0, 0, true);repaint();
                    cmoveCurPiece(0, 0, true);repaint();
                    after_rotate = this.c_curPiece[0].m_nColumn;

                    if (nCol < after_rotate)
                      move_to_left(after_rotate-1, nCol);
                    else
                      move_to_right(after_rotate-1, nCol);
                    break stop;
                  }

                }

               else if(nRow==18){
                 for(nRow=0;nRow<m_nRows;nRow++)
                   for(nCol=0;nCol<m_nCols;nCol++)
                   if(nCol<9&&(checkright(nRow,nCol)
                   ||checkright(nRow+1,nCol))&&
                   !checklocal(nRow,nCol)&&!checklocal(nRow+1,nCol)
                   &&check_movedown(nCol,nCol+1,nRow+2))
                   {
                     cmoveCurPiece(0, 0, true);repaint();
                     after_rotate = this.c_curPiece[0].m_nColumn;
                     if(nCol<after_rotate)
                       move_to_left(after_rotate,nCol);
                     else
                       move_to_right(after_rotate,nCol);

                     break stop;
                   }

                     else {
                         cmoveCurPiece(0, -1, false);
                         repaint();
                         System.out.print("m5 ");
                         break stop;
                     }
                }
            }

           break;

           case 6:
           stop:{
             for (nRow = 0; nRow < m_nRows; nRow++)
               for (nCol = 0; nCol < m_nCols; nCol++)
                 if (nCol > 0 && checkleft(nRow, nCol) &&checkright(nRow, nCol)
                          && checkleft(nRow + 1, nCol) &&checkright(nRow + 1, nCol) &&
                          !checklocal(nRow, nCol) && !checklocal(nRow + 1, nCol) &&
                          check_movedown(nCol-1,nCol,nRow+2)
                          &&check_moveline(nCol,nCol,nRow)&&check_moveline(nCol,nCol,nRow+1)
                          &&check_moveline(nCol-1,nCol,nRow+2)) {
                   cmoveCurPiece(0, 0, true);repaint();
                   cmoveCurPiece(0, 0, true);repaint();
                   cmoveCurPiece(0, 0, true);repaint();
                   after_rotate = this.c_curPiece[0].m_nColumn;
                   if (nCol < after_rotate)
                     move_to_left(after_rotate, nCol);
                   else
                     move_to_right(after_rotate, nCol);

                   break stop;
                 }
               else if (nCol > 0 && checkleft(nRow, nCol) &&checkright(nRow, nCol)
                      && checkleft(nRow + 1, nCol) &&checkright(nRow + 1, nCol) &&
                      !checklocal(nRow, nCol) && !checklocal(nRow + 1, nCol) &&
                      check_movedown(nCol-1,nCol,nRow+2)
                      &&check_moveline(nCol,nCol,nRow)&&check_moveline(nCol,nCol,nRow+1)) {
                cmoveCurPiece(0, 0, true);repaint();
                cmoveCurPiece(0, 0, true);repaint();
                cmoveCurPiece(0, 0, true);repaint();
                after_rotate = this.c_curPiece[0].m_nColumn;
                if (nCol < after_rotate)
                   move_to_left(after_rotate, nCol);
                else
                   move_to_right(after_rotate, nCol);

                break stop;
              }

              else if (nCol < 8 && !checklocal(nRow, nCol) &&
                  checklocal(nRow, nCol + 1)&& checklocal(nRow, nCol + 2) &&check_movedown(nCol,nCol+2,nRow+1)
                  &&check_moveline(nCol,nCol,nRow)&&check_moveline(nCol,nCol+2,nRow+1)) {
                after_rotate = this.c_curPiece[0].m_nColumn;
                if (nCol < after_rotate)
                  move_to_left(after_rotate-1, nCol);
                else
                  move_to_right(after_rotate-1, nCol);

                break stop;

              }
              else if (nCol < 8 && !checklocal(nRow, nCol) &&
                  checklocal(nRow, nCol + 1)&&checkdown(nRow,nCol)
                  && checklocal(nRow, nCol + 2) &&check_movedown(nCol,nCol+2,nRow+1)) {
                  after_rotate = this.c_curPiece[0].m_nColumn;
                  if (nCol < after_rotate)
                    move_to_left(after_rotate-1, nCol);
                  else
                    move_to_right(after_rotate-1, nCol);

                  break stop;

                }
                 else if (nCol > 0 && checkleft(nRow, nCol) &&
                          checkright(nRow, nCol)
                          && checkleft(nRow + 1, nCol) &&
                          checkright(nRow + 1, nCol) &&
                          !checklocal(nRow, nCol) && !checklocal(nRow + 1, nCol) &&
                          check_movedown(nCol-1,nCol,nRow+2)
                          &&checkdown(nRow,nCol)) {
                   cmoveCurPiece(0, 0, true);repaint();
                   cmoveCurPiece(0, 0, true);repaint();
                   cmoveCurPiece(0, 0, true);repaint();
                   after_rotate = this.c_curPiece[0].m_nColumn;
                   if (nCol < after_rotate)
                     move_to_left(after_rotate, nCol);
                   else
                     move_to_right(after_rotate, nCol);

                   break stop;
                 }

                 else if (nCol < 8 && !checklocal(nRow, nCol) &&
                     checklocal(nRow, nCol + 1)
                     && checklocal(nRow, nCol + 2) &&check_movedown(nCol,nCol+2,nRow+1)) {
                   after_rotate = this.c_curPiece[0].m_nColumn;
                   if (nCol < after_rotate)
                     move_to_left(after_rotate-1, nCol);
                   else
                     move_to_right(after_rotate-1, nCol);

                   break stop;

                 }
                 else if (nCol > 0 && checkleft(nRow, nCol) &&
                          checkright(nRow, nCol)
                          && checkleft(nRow + 1, nCol) &&
                          checkright(nRow + 1, nCol) &&
                          !checklocal(nRow, nCol) && !checklocal(nRow + 1, nCol) &&
                          check_movedown(nCol-1,nCol,nRow+2)) {
                   cmoveCurPiece(0, 0, true);repaint();
                   cmoveCurPiece(0, 0, true);repaint();
                   cmoveCurPiece(0, 0, true);repaint();
                   after_rotate = this.c_curPiece[0].m_nColumn;
                   if (nCol < after_rotate)
                     move_to_left(after_rotate, nCol);
                   else
                     move_to_right(after_rotate, nCol);

                   break stop;
                 }

                 else if (nCol > 1 && checkright(nRow + 1, nCol) &&
                          checkright(nRow + 2, nCol) &&
                          checklocal(nRow, nCol) && checklocal(nRow, nCol - 1)
                          && checklocal(nRow, nCol - 2) &&
                          check_movedown(nCol-2,nCol,nRow+1)) {
                   cmoveCurPiece(0, 0, true);repaint();
                   cmoveCurPiece(0, 0, true);repaint();
                   after_rotate = this.c_curPiece[0].m_nColumn;
                   if (nCol < after_rotate)
                     move_to_left(after_rotate+1, nCol);
                   else
                     move_to_right(after_rotate+1, nCol);
                   break stop;
                 }

                 else if (nCol > 1 && checklocal(nRow, nCol) &&
                          checklocal(nRow, nCol - 1)
                          && checklocal(nRow, nCol - 2) &&
                          check_movedown(nCol-2,nCol,nRow+1))

                 {
                   cmoveCurPiece(0, 0, true);repaint();
                   cmoveCurPiece(0, 0, true);repaint();
                   after_rotate = this.c_curPiece[0].m_nColumn;
                   if (nCol < after_rotate)
                     move_to_left(after_rotate+1, nCol);
                   else
                     move_to_right(after_rotate+1, nCol);
                   break stop;
                 }

                 else if (nCol < 9 && checkleft(nRow + 1, nCol) &&
                          checkleft(nRow + 2, nCol)
                          && checklocal(nRow, nCol) && checklocal(nRow, nCol + 1) &&
                          check_movedown(nCol,nCol+1,nRow+1)) {

                   cmoveCurPiece(0, 0, true);repaint();
                   after_rotate = this.c_curPiece[0].m_nColumn;
                   if (nCol < after_rotate)
                     move_to_left(after_rotate, nCol);
                   else
                     move_to_right(after_rotate, nCol);
                   break;
                 }

                 else if(nRow==0){
                  if (this.isWide_num(0, nCol, 3)&&check_movedown(nCol,nCol+2,nRow+1)) {
                    cmoveCurPiece(0, 0, true);
                    repaint();
                    cmoveCurPiece(0, 0, true);
                    repaint();
                    after_rotate = this.c_curPiece[0].m_nColumn;

                    if (nCol < after_rotate)
                      move_to_left(after_rotate-1, nCol);
                    else
                      move_to_right(after_rotate-1, nCol);
                    break stop;
                  }
                  else if (this.isWide_num(0, nCol, 2)&&check_movedown(nCol,nCol+1,nRow+1)) {
                    cmoveCurPiece(0, 0, true);
                    repaint();
                    after_rotate = this.c_curPiece[0].m_nColumn;

                    if (nCol < after_rotate)
                      move_to_left(after_rotate, nCol);
                    else
                      move_to_right(after_rotate, nCol);
                    break stop;
                  }

                }

                 else if(nRow==19){
                 for(nRow=0;nRow<m_nRows;nRow++)
                     for(nCol=0;nCol

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -