Advertisement
Guest User

Untitled

a guest
Dec 21st, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1. public void drawPaddle(Graphics2D g2) {
  2.         g2.fillRoundRect((int) view.model.getGame().getPaddlePosition().getX(),
  3.                 (int) view.model.getGame().getPaddlePosition().getY(),
  4.                 (int) (Constants.PADDLE_WIDTH),
  5.                 (int) (Constants.PADDLE_HEIGHT),
  6.                 (int) 5,
  7.                 (int) 2);
  8.     }
  9.  
  10.    
  11.     private void drawGrid(Graphics2D g2) {
  12.        
  13.         int x;
  14.         int y;
  15.        
  16.         for (x = 0; x < Constants.SCREEN_WIDTH; x += Constants.SCREEN_WIDTH/Constants.SQUARES_X)
  17.         {
  18.             g2.drawLine(x,0,x,500);
  19.         }
  20.  
  21.         for (y = 0; y < Constants.SCREEN_HEIGHT; y += Constants.SCREEN_HEIGHT/Constants.SQUARES_Y)
  22.         {
  23.             g2.drawLine(0,y,600,y);
  24.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement