Coach resigns hours before game