Stranded

Out on the water this morning and had grief! Perfect pass started to total cut in and out, and when I accelerate the engine would hesitate then go, and hesitate again! Then I stopped and idled, when idling the engine stalled right out. I tried to start it again it tried turning over4 times but never fired, then it just went dead and will only click when I try to turn over engine. Has anyone had something like this happen?