Maybe, maybe not. Your realtor might not have reason to know about the restriction. You also should have been given a copy of the CC&Rs and rules and regulations during the escrow. That could be enough to put you on notice. If the prior owner was given notice about the problem and told to fix the floors, but did not tell you, that could be a failure to disclose.
Talk to a local real estate attorney as there are too many facts involved for your problem to be determined on the AVVO site.
Unless your realtor had specific knowledge of the violation and represented otherwise, it will likely not be misrepresentation on the part of your realtor. Generally it is the buyer's responsibility (not the realtor's) to inspect the HOA documents and understand any restrictions that may apply to the unit. The seller has a responsibility to disclose Association rule changes, litigation, or violations issued by the HOA which may affect the property. An examination of the seller's written disclosures would be necessary. Contact a local real estate attorney for an evaluation of your specific facts and circumstances.
Sometimes a failure to disclose can be construed as fraud or a misrepresentation. The CC&R's are recorded in the public record and you should have been given or had access to them prior to purchasing the property. Assuming this was an actionable misrepresentation, the next question you'll need to address is how you were harmed. If you were not harmed or suffered any actual damages a lawsuit may not be advisable. Also, if you have an issue with your realtor for violating a duty to disclose you can typically arbitrate these issues. You should consult an attorney to flush out these issues.
Best of luck!
The above is general legal analysis. It is not "legal advice" but analysis, and different lawyers may analyze this matter differently, especially if there are additional facts not reflected in the question. The above response does not create an attorney/client relationship. I am not your attorney until retained by a written retainer agreement signed by both of us. See also avvo.com terms and conditions item 9, incorporated as if it was reprinted here