Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.34 KB | None | 0 0
  1. for (int i = 0; i < 64; i++) {
  2.   int cellX = i % 8;
  3.   int cellY = i / 8;
  4.   if (squareTypes[i] == 0)
  5.     g.drawImage(boardSquare, cellX * 32, cellY * 32, this);
  6.   if (squareTypes[i] == 1)
  7.     g.drawImage(whitePiece,  cellX * 32, cellY * 32, this);
  8.   if (squareTypes[i] == 2)
  9.     g.drawImage(blackPiece,  cellX * 32, cellY * 32, this);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement