module player_move(rst,clk,in,size,pos);
input rst,clk;
input [1:0]in;
input [7:0]size;
output [9:0]pos;
reg [9:0]pos;
reg [31:0]count;
always@(posedge clk,negedge rst)
begin
    if(!rst)
    begin
        pos<=10'd210;
        count<=32'd0;
    end
    else
    begin
        if(count==`Buttun_time)
        begin
            count<=32'd0;
            case(in)
                2'b01:pos<=pos+((pos+size)<=600);
                2'b10:pos<=pos-(pos!=0);
                default:pos<=pos;
            endcase
        end
        else count<=count+32'd1;
    end
end
endmodule