Advertisement
Guest User

task4piecec

a guest
Oct 17th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. if (simpleColumn >= 1 && simpleColumn <= 8){ //setting the pieces in the correct columns
  2. setLayoutX((VIEWER_WIDTH/4-PIECE_SIZE) + ((simpleColumn % 9)*PIECE_SIZE/4));
  3.  
  4. }
  5.  
  6. if (row >= 65 && row <= 68){ //setting the pieces in the correct rows
  7. int simpleRow = row-64;
  8. if (simpleRow == 1){
  9. setLayoutY(centreY-PIECE_SIZE/4);
  10. } else if(simpleRow == 2){
  11. setLayoutY(centreY);
  12. } else if (simpleRow == 3){
  13. setLayoutY(centreY+PIECE_SIZE/4);
  14. } else {
  15. setLayoutY(centreY+PIECE_SIZE/2);
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement