Enumeration of curves via floor diagrams