Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. super.paintComponent(g);
  2.  
  3. for(int x = 0; x < COL_COUNT; x++)
  4. {
  5. for(int y = 0; y < ROW_COUNT; y++)
  6. {
  7. TileType type = getTile(x, y);
  8. if(type != null)
  9. {
  10. drawTile(x * TILE_SIZE, y * TILE_SIZE, type, g);
  11. }
  12. }
  13. }
  14. g.setColor(Color.RED);
  15. g.drawRect(0, 0, getWidth() - 1, getHeight() - 1);
  16. for(int x = 0; x < COL_COUNT; x++)
  17. {
  18. for(int y = 0; y < ROW_COUNT; y++)
  19. {
  20. g.drawLine(x * TILE_SIZE, 0, x * TILE_SIZE, getHeight());
  21. g.drawLine(0, y * TILE_SIZE, getWidth(), y * TILE_SIZE);
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement