data/full_repos/permissive/172602559/PONG!!/pong.v
 line:1: before: "Main"
1: b"%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:1: syntax error, unexpected IDENTIFIER\nMain.v\n^~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:2: Define or directive not defined: '`definecolor_red'\n`definecolor_red 8'b11100000\n^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:3: Define or directive not defined: '`definecolor_blue'\n`definecolor_blue 8'b00000011\n^~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:4: Define or directive not defined: '`definecolor_white'\n`definecolor_white 8'b11111111\n^~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:5: Define or directive not defined: '`definecolor_black'\n`definecolor_black 8'b00000000\n^~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:6: Define or directive not defined: '`definecolor_pink'\n`definecolor_pink 8'b11111010\n^~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:8: Define or directive not defined: '`definestate_reset'\n`definestate_reset 2'b00\n^~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:9: Define or directive not defined: '`definestate_player_select'\n`definestate_player_select 2'b01\n^~~~~~~~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:10: Define or directive not defined: '`definestate_game'\n`definestate_game 2'b10\n^~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:11: Define or directive not defined: '`definestate_pause'\n`definestate_pause 2'b11\n^~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:19: Define or directive not defined: '`definekey_esc'\n`definekey_esc 8'h76\n^~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:20: Define or directive not defined: '`definekey_space'\n`definekey_space 8'h29\n^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:24: Define or directive not defined: '`definepaddle_width'\n`definepaddle_width 64\n^~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:25: Define or directive not defined: '`definepaddle_height'\n`definepaddle_height 8\n^~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:27: Define or directive not defined: '`defineball_width'\n`defineball_width 8\n^~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:28: Define or directive not defined: '`defineball_height'\n`defineball_height 8\n^~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:30: Define or directive not defined: '`definescreen_width'\n`definescreen_width 640\n^~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:31: Define or directive not defined: '`definescreen_height'\n`definescreen_height 480\n^~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:33: Define or directive not defined: '`defineborder_size'\n`defineborder_size 6\n^~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:34: Define or directive not defined: '`definefeature_size'\n`definefeature_size 11\n^~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:36: Define or directive not defined: '`defineai_speed_default'\n`defineai_speed_default 4\n^~~~~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:44: syntax error, unexpected IDENTIFIER, expecting ')' or ','\n outputreg [7:0]color,\n                ^~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:51: syntax error, unexpected IDENTIFIER\nregold_done;\n^~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:57: syntax error, unexpected IDENTIFIER\nreggame;  \n^~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:60: syntax error, unexpected IDENTIFIER\nwireenable_score;\n^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:65: syntax error, unexpected IDENTIFIER\nregball_dx, ball_dy;     \n^~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:79: syntax error, unexpected IDENTIFIER\nregplayer_number;  \n^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:88: syntax error, unexpected IDENTIFIER\nkeyboardkeyb(.clock(clock),.ps2_clock(ps2_clock), .ps2_data(ps2_data),.done(done), .tasta(tasta));\n^~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:94: Define or directive not defined: '`state_reset'\n states<= `state_reset;\n          ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:98: Define or directive not defined: '`ai_speed_default'\n ai_speed<= `ai_speed_default;\n            ^~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:122: Define or directive not defined: '`state_reset'\n    `state_reset:\n    ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:124: Define or directive not defined: '`screen_width'\n      ball_x<= `screen_width>> 1;  \n               ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:125: Define or directive not defined: '`screen_height'\n      ball_y<= `screen_height>> 1;\n               ^~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:127: Define or directive not defined: '`screen_width'\n      paddle2_x <= `screen_width>> 1;\n                   ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:128: Define or directive not defined: '`border_size'\n      paddle2_y <= `border_size<< 2;\n                   ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:130: Define or directive not defined: '`screen_width'\n      paddle1_x <= `screen_width>> 1;\n                   ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:131: Define or directive not defined: '`screen_height'\n      paddle1_y <= `screen_height - (`border_size<< 2);\n                   ^~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:131: Define or directive not defined: '`border_size'\n      paddle1_y <= `screen_height - (`border_size<< 2);\n                                     ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:133: Define or directive not defined: '`state_player_select'\n      states<= `state_player_select;\n               ^~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:138: Define or directive not defined: '`state_player_select'\n    `state_player_select:\n    ^~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:147: Define or directive not defined: '`key_space'\n      end else if (key == `key_space) begin\n                          ^~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:149: Define or directive not defined: '`state_game'\n       states<= `state_game;\n                ^~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:159: Define or directive not defined: '`state_game'\n    `state_game:\n    ^~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:162: Define or directive not defined: '`key_space'\n      if (key == `key_space) begin\n                 ^~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:163: Define or directive not defined: '`state_pause'\n       states<= `state_pause;\n                ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:166: Define or directive not defined: '`feature_size'\n       if (paddle1_x >= `feature_size + `ball_width + (`paddle_width>> 1))\n                        ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:166: Define or directive not defined: '`ball_width'\n       if (paddle1_x >= `feature_size + `ball_width + (`paddle_width>> 1))\n                                        ^~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:166: Define or directive not defined: '`paddle_width'\n       if (paddle1_x >= `feature_size + `ball_width + (`paddle_width>> 1))\n                                                       ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:167: Define or directive not defined: '`ball_width'\n        paddle1_x <= paddle1_x - `ball_width;\n                                 ^~~~~~~~~~~\n%Error: data/full_repos/permissive/172602559/PONG!!/pong.v:170: Define or directive not defined: '`screen_width'\n       if (paddle1_x <= `screen_width - `feature_size - `ball_width - (`paddle_width>> 1))\n                        ^~~~~~~~~~~~~\n%Error: Exiting due to too many errors encountered; --error-limit=50\n"
module main(
	input clock,
	input ps2_data,
	input ps2_clock,
	input reset,
outputhsync,
outputvsync,
	outputreg [7:0]color,
	output [3:0] digit_selection,
	output [7:0] segment_selection
);


wire done;
regold_done;
wire [7:0]tasta;

reg border;
wire Inside;
wire [9:0] x_out, y_out;
reggame;

reg [3:0] score1, score2;
wireenable_score;
wire [7:0] out_score;

reg [9:0] ball_x, ball_y;
reg [3:0] ball_vx, ball_vy;
regball_dx, ball_dy;

reg [9:0] paddle1_x, paddle1_y;
reg [7:0] paddle1_vx, paddle1_vy;

reg [9:0] paddle2_x, paddle2_y;
reg [7:0] paddle2_vx, paddle2_vy;

reg [5:0] counter;
reg [5:0] speed;

reg [5:0] ai_counter;
reg [5:0] ai_speed;

regplayer_number;
reg [1:0] states;





reg [7:0] key;

keyboardkeyb(.clock(clock),.ps2_clock(ps2_clock), .ps2_data(ps2_data),.done(done), .tasta(tasta));
display lcd(.clock(clock),.vsync(vsync),.hsync(hsync),.Inside(Inside),.x_out(x_out),.y_out(y_out));

Scor Scor(.clock(clock),.scor1(score1),.scor2(score2),.dec(digit_selection),.out(segment_selection),.enable(1));

initial begin
	states<= `state_reset;
	speed<= 5;
	score1 <= 0;
	score2 <= 0;
	ai_speed<= `ai_speed_default;
end


always @(posedge clock)
begin
	if(Inside) begin


		if(old_done != done) begin
			if(done) begin
				key<= tasta;

			end else


			old_done<= done;
		end


		if(x_out == 1 &&y_out == 1) begin


			case (states)
				`state_reset:
					begin
						ball_x<= `screen_width>> 1;
						ball_y<= `screen_height>> 1;

						paddle2_x <= `screen_width>> 1;
						paddle2_y <= `border_size<< 2;

						paddle1_x <= `screen_width>> 1;
						paddle1_y <= `screen_height - (`border_size<< 2);

						states<= `state_player_select;

						score1 <= 0;
						score2 <= 0;
					end
				`state_player_select:
					begin

						if (key == `key_1) begin
							player_number<= 0;
							key<= 0;
						end else if (key == `key_2) begin
							player_number<=1;
							key<= 0;
						end else if (key == `key_space) begin
							key<= 0;
							states<= `state_game;


							ball_vx<= 3;
							ball_vy<= 2;
							ball_dx<= 1;
							ball_dy<= 1;
							speed<= 5;
						end
					end
				`state_game:
					begin

						if (key == `key_space) begin
							states<= `state_pause;
							key<= 0;
						end else if (key == `key_player1_left) begin
							if (paddle1_x >= `feature_size + `ball_width + (`paddle_width>> 1))
								paddle1_x <= paddle1_x - `ball_width;
							key<= 0;
						end else if (key == `key_player1_right) begin
							if (paddle1_x <= `screen_width - `feature_size - `ball_width - (`paddle_width>> 1))
								paddle1_x <= paddle1_x + `ball_width;
							key<= 0;
						end else if (key == `key_player2_left) begin
							if(player_number)
								if (paddle2_x >= `feature_size + `ball_width + (`paddle_width>> 1))
									paddle2_x <= paddle2_x - `ball_width;
							key<= 0;
						end else if (key == `key_player2_right) begin
							if(player_number)
								if (paddle2_x <= `screen_width - `feature_size - `ball_width - (`paddle_width>> 1))
									paddle2_x <= paddle2_x + `ball_width;
							key<= 0;
						end


						if(counter == speed) begin
							counter<= 0;

							if(ball_dx)
								if (ball_x<= `screen_width - `feature_size - `ball_width - (`ball_width>> 1))
									ball_x<= ball_x + `ball_width;
								else
									ball_dx<= 0;
							else
								if (ball_x>= `feature_size + `ball_width + (`ball_width>> 1))
									ball_x<= ball_x - `ball_width;
								else
									ball_dx<= 1;

						if(ball_dy)
								if ((ball_x>= paddle1_x - (`paddle_width>> 1)) && (ball_x<= paddle1_x + (`paddle_width>> 1)) && (ball_y == paddle1_y - `ball_width)) begin
									ball_dy<= 0;
									if(speed > 1)
										speed<= speed - 1;

								end else if (ball_y<= `screen_height - `feature_size - `ball_width - (`ball_width>> 1))
									ball_y<= ball_y + `ball_width;
								else begin
									ball_dy<= 0;
									speed<= 5;
									score2 <= score2 + 1;
									if (score2 == 9)
										states<= `state_reset;

								end
							else
								if ((ball_x>= paddle2_x - (`paddle_width>> 1)) && (ball_x<= paddle2_x + (`paddle_width>> 1)) && (ball_y == paddle2_y + `ball_width)) begin
									ball_dy<= 1;
									if(speed > 1)
										speed<= speed - 1;

								end else if (ball_y>= `feature_size + `ball_width + (`ball_width>> 1))
									ball_y<= ball_y - `ball_width;
								else begin
									ball_dy<= 1;
									speed<= 5;
									score1 <= score1 + 1;
									if (score1 == 9)
										states<= `state_reset;
								end


						end else
							counter<= counter + 1;

						if(!player_number) begin



							if(ai_counter == ai_speed) begin
								ai_counter<= 0;


								if(ball_x> paddle2_x)

									if (paddle2_x <= `screen_width - `feature_size - `ball_width - (`paddle_width>> 1))
										paddle2_x <= paddle2_x + `ball_width;

								if(ball_x< paddle2_x)

									if (paddle2_x >= `feature_size + `ball_width + (`paddle_width>> 1))
										paddle2_x <= paddle2_x - `ball_width;
							end else
								ai_counter<= ai_counter + 1;
						end
					end
				`state_pause:
					begin

						if (key == `key_space) begin
							states<= `state_game;
							key<= 0;
						end else if (key == `key_esc) begin
							states<= `state_reset;
							key<= 0;
						end
					end
			endcase

		end


		if (x_out<= `border_size || x_out>= `screen_width - `border_size || (y_out> 1 &&y_out<= `border_size) || y_out>= `screen_height - `border_size)
			color<= `color_white;
		else if (x_out<= `feature_size || x_out>= `screen_width - `feature_size || (y_out> 1 &&y_out<= `feature_size) || y_out>= `screen_height - `feature_size)
			color<= `color_pink;


		else if (x_out>= paddle1_x  - (`paddle_width>> 1) &&x_out<= paddle1_x + (`paddle_width>> 1) &&y_out>= paddle1_y - (`paddle_height>> 1) &&y_out<= paddle1_y  + (`paddle_height>> 1))
			color<= `color_red;


		else if (x_out>= paddle2_x  - (`paddle_width>> 1) &&x_out<= paddle2_x + (`paddle_width>> 1) &&y_out>= paddle2_y - (`paddle_height>> 1) &&y_out<= paddle2_y  + (`paddle_height>> 1))
			if(states == `state_player_select)
				if(player_number)
					color<= `color_red;
				else
					color<= `color_black;
			else
				color<= `color_red;


		else if (x_out>= ball_x  - (`ball_width>> 1) &&x_out<= ball_x + (`ball_width>> 1) &&y_out>= ball_y - (`ball_height>> 1) &&y_out<= ball_y  + (`ball_height>> 1))
			color<= `color_white;

		else
			color<= `color_black;
	end
end



endmodule
module main(
	input clock,
	input ps2_data,
	input ps2_clock,
	input reset,
outputhsync,
outputvsync,
	outputreg [7:0]color,
	output [3:0] digit_selection,
	output [7:0] segment_selection
);



wire done;
regold_done;
wire [7:0]tasta;

reg border;
wire Inside;
wire [9:0] x_out, y_out;
reggame;

reg [3:0] score1, score2;
wireenable_score;
wire [7:0] out_score;

reg [9:0] ball_x, ball_y;
reg [3:0] ball_vx, ball_vy;
regball_dx, ball_dy;

reg [9:0] paddle1_x, paddle1_y;
reg [7:0] paddle1_vx, paddle1_vy;

reg [9:0] paddle2_x, paddle2_y;
reg [7:0] paddle2_vx, paddle2_vy;

reg [5:0] counter;
reg [5:0] speed;

reg [5:0] ai_counter;
reg [5:0] ai_speed;

regplayer_number;
reg [1:0] states;





reg [7:0] key;

keyboardkeyb(.clock(clock),.ps2_clock(ps2_clock), .ps2_data(ps2_data),.done(done), .tasta(tasta));
display lcd(.clock(clock),.vsync(vsync),.hsync(hsync),.Inside(Inside),.x_out(x_out),.y_out(y_out));

Scor Scor(.clock(clock),.scor1(score1),.scor2(score2),.dec(digit_selection),.out(segment_selection),.enable(1));

initial begin
	states<= `state_reset;
	speed<= 5;
	score1 <= 0;
	score2 <= 0;
	ai_speed<= `ai_speed_default;
end


always @(posedge clock)
begin
	if(Inside) begin


		if(old_done != done) begin
			if(done) begin
				key<= tasta;

			end else


			old_done<= done;
		end


		if(x_out == 1 &&y_out == 1) begin


			case (states)
				`state_reset:
					begin
						ball_x<= `screen_width>> 1;
						ball_y<= `screen_height>> 1;

						paddle2_x <= `screen_width>> 1;
						paddle2_y <= `border_size<< 2;

						paddle1_x <= `screen_width>> 1;
						paddle1_y <= `screen_height - (`border_size<< 2);

						states<= `state_player_select;

						score1 <= 0;
						score2 <= 0;
					end
				`state_player_select:
					begin

						if (key == `key_1) begin
							player_number<= 0;
							key<= 0;
						end else if (key == `key_2) begin
							player_number<=1;
							key<= 0;
						end else if (key == `key_space) begin
							key<= 0;
							states<= `state_game;


							ball_vx<= 3;
							ball_vy<= 2;
							ball_dx<= 1;
							ball_dy<= 1;
							speed<= 5;
						end
					end
				`state_game:
					begin

						if (key == `key_space) begin
							states<= `state_pause;
							key<= 0;
						end else if (key == `key_player1_left) begin
							if (paddle1_x >= `feature_size + `ball_width + (`paddle_width>> 1))
								paddle1_x <= paddle1_x - `ball_width;
							key<= 0;
						end else if (key == `key_player1_right) begin
							if (paddle1_x <= `screen_width - `feature_size - `ball_width - (`paddle_width>> 1))
								paddle1_x <= paddle1_x + `ball_width;
							key<= 0;
						end else if (key == `key_player2_left) begin
							if(player_number)
								if (paddle2_x >= `feature_size + `ball_width + (`paddle_width>> 1))
									paddle2_x <= paddle2_x - `ball_width;
							key<= 0;
						end else if (key == `key_player2_right) begin
							if(player_number)
								if (paddle2_x <= `screen_width - `feature_size - `ball_width - (`paddle_width>> 1))
									paddle2_x <= paddle2_x + `ball_width;
							key<= 0;
						end


						if(counter == speed) begin
							counter<= 0;

							if(ball_dx)
								if (ball_x<= `screen_width - `feature_size - `ball_width - (`ball_width>> 1))
									ball_x<= ball_x + `ball_width;
								else
									ball_dx<= 0;
							else
								if (ball_x>= `feature_size + `ball_width + (`ball_width>> 1))
									ball_x<= ball_x - `ball_width;
								else
									ball_dx<= 1;

						if(ball_dy)
								if ((ball_x>= paddle1_x - (`paddle_width>> 1)) && (ball_x<= paddle1_x + (`paddle_width>> 1)) && (ball_y == paddle1_y - `ball_width)) begin
									ball_dy<= 0;
									if(speed > 1)
										speed<= speed - 1;

								end else if (ball_y<= `screen_height - `feature_size - `ball_width - (`ball_width>> 1))
									ball_y<= ball_y + `ball_width;
								else begin
									ball_dy<= 0;
									speed<= 5;
									score2 <= score2 + 1;
									if (score2 == 9)
										states<= `state_reset;

								end
							else
								if ((ball_x>= paddle2_x - (`paddle_width>> 1)) && (ball_x<= paddle2_x + (`paddle_width>> 1)) && (ball_y == paddle2_y + `ball_width)) begin
									ball_dy<= 1;
									if(speed > 1)
										speed<= speed - 1;

								end else if (ball_y>= `feature_size + `ball_width + (`ball_width>> 1))
									ball_y<= ball_y - `ball_width;
								else begin
									ball_dy<= 1;
									speed<= 5;
									score1 <= score1 + 1;
									if (score1 == 9)
										states<= `state_reset;
								end


						end else
							counter<= counter + 1;

						if(!player_number) begin



							if(ai_counter == ai_speed) begin
								ai_counter<= 0;


								if(ball_x> paddle2_x)

									if (paddle2_x <= `screen_width - `feature_size - `ball_width - (`paddle_width>> 1))
										paddle2_x <= paddle2_x + `ball_width;

								if(ball_x< paddle2_x)

									if (paddle2_x >= `feature_size + `ball_width + (`paddle_width>> 1))
										paddle2_x <= paddle2_x - `ball_width;
							end else
								ai_counter<= ai_counter + 1;
						end
					end
				`state_pause:
					begin

						if (key == `key_space) begin
							states<= `state_game;
							key<= 0;
						end else if (key == `key_esc) begin
							states<= `state_reset;
							key<= 0;
						end
					end
			endcase

		end


		if (x_out<= `border_size || x_out>= `screen_width - `border_size || (y_out> 1 &&y_out<= `border_size) || y_out>= `screen_height - `border_size)
			color<= `color_white;
		else if (x_out<= `feature_size || x_out>= `screen_width - `feature_size || (y_out> 1 &&y_out<= `feature_size) || y_out>= `screen_height - `feature_size)
			color<= `color_pink;


		else if (x_out>= paddle1_x  - (`paddle_width>> 1) &&x_out<= paddle1_x + (`paddle_width>> 1) &&y_out>= paddle1_y - (`paddle_height>> 1) &&y_out<= paddle1_y  + (`paddle_height>> 1))
			color<= `color_red;


		else if (x_out>= paddle2_x  - (`paddle_width>> 1) &&x_out<= paddle2_x + (`paddle_width>> 1) &&y_out>= paddle2_y - (`paddle_height>> 1) &&y_out<= paddle2_y  + (`paddle_height>> 1))
			if(states == `state_player_select)
				if(player_number)
					color<= `color_red;
				else
					color<= `color_black;
			else
				color<= `color_red;


		else if (x_out>= ball_x  - (`ball_width>> 1) &&x_out<= ball_x + (`ball_width>> 1) &&y_out>= ball_y - (`ball_height>> 1) &&y_out<= ball_y  + (`ball_height>> 1))
			color<= `color_white;

		else
			color<= `color_black;
	end
end



endmodule