func (p *Pong) Draw(screen Screen) {

	black := Color{0, 0, 0}
	white := Color{255, 255, 255}
	green := Color{0, 200, 0}
	red := Color{200, 0, 0}

	// Background
	screen.DrawRect(0, 0, screen.Width(), screen.Height(), black)

	// Player
	screen.DrawRect(p.player.x, p.player.y, p.player.w, p.player.h, white)

	// Computer
	screen.DrawRect(p.computer.x, p.computer.y, p.computer.w, p.computer.h, red)

	// Ball
	screen.DrawRect(p.ball.x, p.ball.y, p.ball.w, p.ball.h, green)

	// Points
	screen.DrawText(strconv.Itoa(p.player.points), screen.Width()/2-50, 20, white)
	screen.DrawText(strconv.Itoa(p.computer.points), screen.Width()/2+50, 20, white)
}
// Draw the objects on the screen
Draw the objects on the screen
// Draw the objects on the screen
func (p *Pong) Draw(screen Screen) {
	black := Color{0, 0, 0}
	white := Color{255, 255, 255}
	green := Color{0, 200, 0}
	red := Color{200, 0, 0}
	screen.DrawRect(0, 0, screen.Width(), screen.Height(), black)
	screen.DrawRect(p.player.x, p.player.y, p.player.w, p.player.h, white)
	screen.DrawRect(p.computer.x, p.computer.y, p.computer.w, p.computer.h, red)
	screen.DrawRect(p.ball.x, p.ball.y, p.ball.w, p.ball.h, green)
	screen.DrawText(strconv.Itoa(p.player.points), screen.Width()/2-50, 20, white)
	screen.DrawText(strconv.Itoa(p.computer.points), screen.Width()/2+50, 20, white)
}
func ( p * Pong ) Draw ( screen Screen ) { black := Color { 0 , 0 , 0 } white := Color { 255 , 255 , 255 } green := Color { 0 , 200 , 0 } red := Color { 200 , 0 , 0 } screen . DrawRect ( 0 , 0 , screen . Width ( ) , screen . Height ( ) , black ) screen . DrawRect ( p . player . x , p . player . y , p . player . w , p . player . h , white ) screen . DrawRect ( p . computer . x , p . computer . y , p . computer . w , p . computer . h , red ) screen . DrawRect ( p . ball . x , p . ball . y , p . ball . w , p . ball . h , green ) screen . DrawText ( strconv . Itoa ( p . player . points ) , screen . Width ( ) / 2 - 50 , 20 , white ) screen . DrawText ( strconv . Itoa ( p . computer . points ) , screen . Width ( ) / 2 + 50 , 20 , white ) }
Draw the objects on the screen
Draw the objects on the screen
// Background // Player // Computer // Ball // Points