Alantrivandrum_Pong-Game/Pong_Game/player_for_pong/player_for_pong.pde
 final int SCREENX = 320;
      final int SCREENY = 240;
      final int PADDLEHEIGHT = 15;
      final int PADDLEWIDTH = 50;
      final int MARGIN = 10;
 
 class Player {
int xpos; int ypos;
color paddlecolor = color(50);
Player(int screen_y)
{
xpos=SCREENX/2;
ypos=screen_y;
}
void move(int x){
if(x>SCREENX-PADDLEWIDTH) xpos = SCREENX-PADDLEWIDTH;
else xpos=x;
}
void draw()
{
fill(paddlecolor);
rect(xpos, ypos, PADDLEWIDTH, PADDLEHEIGHT);
}
}
