pottersheep
  • pottersheep
Java - tetris code explanation please?
Computer Science
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
schrodinger
  • schrodinger
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
pottersheep
  • pottersheep
I need a code for rotating the blocks but I have no idea how ! >.< I found this example on the internet: int items[]={ 0,0, -1,0, 0,-1, -1,-1, // cube, normal 0,0, -1,0, 0,1, -1,1, // rotated 90 degrees 0,0, 1,0, 0,1, 1,1, // rotated 180 degrees 0,0, 1,0, 0,-1, 1,-1, // rotated 270 degrees 0,0, 0,-1, 0,-2, 0,-3, // straight line 0,0, -1,0, -2,0, -3,0, 0,0, 0,1, 0,2, 0,3, 0,0, 1,0, 2,0, 3,0, 0,0, 1,0, 0,-1, -1,-1, // stupid block 0,0, 0,-1, -1,0, -1, 1, 0,0, -1,0, 0,1, 1,1, 0,0, 0,1, 1,0, 1,-1, 0,0, -1,0, 0,-1, 1,-1, // stupid block 2 0,0, 0,1, -1,0, -1,-1, 0,0, 1,0, 0,1, -1,1, 0,0, 0,-1, 1,0, 1,1, 0,0, 1,0, -1,0, 0,-1, // another one 0,0, 0,1, 0,-1, -1,0, 0,0, 0,1, -1,0, 1,0, 0,0, 1,0, 0,-1, 0,1, 0,0, 0,-1, 1,-1, 0,1, // hook one 0,0, -1,0, -1,-1, 1,0, 0,0, -1,1, 0,1, 0,-1, 0,0, -1,0, 1,0, 1,1, 0,0, 0,1, 0,-1, -1,-1, // hook two 0,0, 1,0, -1,0, -1,1, 0,0, 0,-1, 0,1, 1,1, 0,0, -1,0, 1,0, 1,-1 }; int checks[]={ -1,1, 0,1, -1,1, 0,1, // check cube, normal -1,2, 0,2, -1,2, 0,2, // check, rotated 90 degrees 0,2, 1,2, 0,2, 1,2, // check, rotated 180 degrees 0,1, 1,1, 0,1, 1,1, // check, rotated 270 degrees 0,1, 0,1, 0,1, 0,1, 0,1, -1,1, -2,1, -3,1, 0,4, 0,4, 0,4, 0,4, // straight line 0,1, 1,1, 2,1, 3,1, 0,1, -1,0, 1,1, 0,1, // stupid block one 0,1, -1,2, 0,1, -1,2, 0,2, 1,2, -1,2, 0,2, 0,2, 1,1, 0,2, 1,1, -1,1, 0,1, 1,0, 1,0, // stupid block two -1,1, 0,2, 0,2, -1,1, -1,2, 0,2, 1,1, 1,1, 0,1, 1,2, 0,1, 1,2, -1,1, 0,1, 1,1, 1,1, // block three -1,1, 0,2, 0,2, -1,1, -1,1, 0,2, 1,1, 1,1, 0,2, 1,1, 0,2, 1,1, 0,2, 1,0, 1,0, 0,2, // hook one -1,1, 0,1, 1,1, 1,1, -1,2, 0,2, 0,2, -1,2, -1,1, 0,1, 1,2, 1,2, -1,0, 0,2, 0,2, -1,0, // hook two -1,2, 0,1, 1,1, 1,1, 0,2, 1,2, 1,2, 0,2, -1,1, 0,1, 1,1, 1,1 };
pottersheep
  • pottersheep
Can someone please explain the code for me please? why is there a list of coordinates? Is that an array or something? MY TEACHERS MAKING ME DO THE IMPOSSIBLE IVE ONLY BEEN STUDYING COMPUTER SCIENCE FROM SCRATCH SINCE OCTOBER HOW THE HELL DO I PROGRAM TETRIS I BARELY CAN MAKE A CALCULATOR PANICCCCCCCCCC

Looking for something else?

Not the answer you are looking for? Search for more explanations.