The complaint alleges as the cause of action, the performance of work, labor and services by the plaintiff as an architect in preparing plans for a proposed building for the defendant, at his request .and a promise by the defendant to pay therefor what such work should be reasonably worth.
The answer sets up a special contract, under which it was alleged such work was performed, and states that the defendant and other persons were interested in the formation óf a club to erect an apartment-house in the city of New York, and that the plaintiff was employed to draw plans for such proposed building under an agreement that, if the club or association was organized and the building-erected, the architect whose plans should be accepted would be paid by the club or association for the drawing of plans and would be employed to superintend the erection of the building, but in case the club was not formed and the plans and specifications were not adopted then the plaintiff was not to be paid.
Upon proof given on the trial the referee, among other things, found that the defendant authorized the plaintiff “to prepare and submit such plans upon the understanding or agreement between said parties, that the plaintiff should prepare and submit said plans in competition with other architects ; that said apartment-house should be built either by defendant or by a club to be formed; that if plaintiff’s plans were not adopted either by such club, if formed, or by defendant, if such club were not formed, plaintiff should receive no pay for his services; but if said plans were adopted by said club, if formed, or by defendant, if such club were not formed, plaintiff should be paid for such services what they were reasonably worth; ” that the plaintiff submitted plans and defendant preferred such plans and adopted them in case said club should not be formed; that *596the proposed club was never formed and the defendant finally abandoned the project of building either by himself or by a club ; and, as a conclusion of law, the referee held that the plaintiff was entitled to recover what his services were reasonably worth.
The defendant duly excepted to that part of the findings of fact which stated that it was a part of the contract “ that said apartment-house should be built either by the defendant or by a club to be formed,” and also to so much thereof as found that defendant “ adopted said plans in case said club was not formed.”
A direct conflict of evidence occurred on the trial between the plaintiff and defendant, as to the terms of the contract of employment, and the referee has found in favor of the defendant’s version of the transaction, but instead of giving him the benefit of such finding, has decided the law upon a cause of action not stated in the pleadings or established, as we think, by the evidence.
It is a fundamental rule that judgment shall be “ secundum allegata et prolata,” and, as was said in Day v. New Lots (107 N. Y. 148; 11 N. Y. State Rep. 361), any departure from that rule is certain to produce surprise, confusion and injustice.
It was said by Judge Earl in Southwick v. First Nat. Bank of Memphis (61 How. Pr. 170), that “ pleadings and a distinct issue are essential in every system of jurisprudence, and there can be no orderly administration of justice without them. If a party can allege one cause of action and then recover upon another, his complaint will serve no useful purpose, but rather to ensnare and mislead his adversary.”
It does not appear that the theory upon which this action was determined was mentioned or referred to upon the trial, and its first appearance occurs in the opinion of the referee, wherein he says, “ it is true that upon this view the plaintiff recovers upon a somewhat different cause of *597action from that stated in the complaint,” and this is followed by the suggestion that the pleadings “ may be amended, or deemed amended, to conform to the proof.” This is to ignore the whole office of a pleading and compel parties to try their cases in the dark, informing them for the first time after the wrong is irremediable of the issue which they should have' tried. The pleadings were not amended, and they could not lawfully be amended in a material respect except at a time which would give the party against whom the amendment is allowed a right and opportunity to meet by proof the allegations made against him. There are cases which, having proceeded in disregard of the pleadings, and wherein the whole case has been presented by both parties in their proofs without, objection, in which an amendment has been allowed, after the evidence is closed, to conform the pleadings to the proofs; so, also, where the court can see that a trial has been had upon the real issue without objection, it will not disturb a recovery upon the ground that it was not embraced in the pleadings; but when the objection has been properly taken, or an exception presents the question, it is fatal to a recovery that it does not conform in all material respects to the allegations of the pleadings.
We do not think that the evidence warranted the finding of the referee, that the defendant agreed with the plaintiff to erect a building, either by himself or through a club. It is very certain that there is no evidence of an express agreement to that effect, and so the general term states in its opinion, although it held it might reasonably be implied from the circumstances of the case.
An elementary writer has said that “ it not unfrequently happens that in the course of carrying out a contract circumstances arise which have not been contemplated by the parties and consequently where no intention has been expressed by them or can be inferred from their acts. In such cases the law prescribes their respective rights and liabilities accord*598ing to the dictates of justice, that is of equality, and according to what is presumed their intention would have been had they had those circumstances in their consideration when they made their contract.” Addison on Contracts, 22.
The inquiry in such cases always is what the parties would probably have agreed upon if the contingency had been within their contemplation at the time of making their contract. Suppose the plaintiff had then said to the defendant, I am willing to rely upon your judgment and taste in the adoption or rejection of my plans and to give you credit for their payment if adopted, but your plans are all in embryo, and I do not know whether you will finally build or not; I therefore insist upon your agreeing absolutely to build. Can the court say that the defendant would have entered into such an engagement ? We think not.
It does not seem to us that the circumstances surrounding this transaction bring it within the rule stated. Certainly nothing could have been farther from the contemplation of the defendant than that he should be required to pay for plans which would prove useless to him, or that he should be compelled to proceed with the erection of a structure which he had never finally concluded to build, and it is not reasonable to suppose that the plaintiff believed that the defendant absolutely contracted with him to carry out plans which he always knew were then immature and unformed. Thus the referee expressly finds that the defendant’s plans were unformed and immature, and it was a natural supposition under the circumstances that they might never ripen into an absolute determination to build' in the mode and manner contemplated, and yet he has found that an absolute covenant to build might nevertheless be implied against the defendant. . If this may be implied in favor of the plaintiff a similar covenant must have been made with each of the numerous architects who submitted plans for competition, and thus the defendant would be made liable for all such plans although he had made with *599each architect an express agreement that he should not be liable therefor unless his plans were adopted.
An absolute contract to build was foreign to the object and design of the negotiations with the architects, and was entirely unnecessary to the purpose which they all had in view. They all knew that the acceptance and adoption of their plans was contingent, and that they were liable to be rejected at the mere caprice or discretion of the defendant, and it is unreasonable to suppose that they then believed that he intended to create a positive obligation on his part to build in any event. The plaintiff certainly had no such idea, for he did not allude to it in his complaint, but planted himself upon the theory of an unconditional employment by the defendant to perform the work for which he sought to recover. We think the circumstances of the case repel the inference that the parties supposed the defendant intended to enter into an absolute engagement to build the proposed structure.
We are also of the opinion that the plaintiff’s plans were not accepted or adopted within the meaning of those terms as used in the contract found by the referee. They were used in connection with the idea of the employment of an architect upon a competitive trial without compensation unless his plans were adopted. It cannot be assumed that the employer intended under such circumstances to pay for the plans unless they were of value to him and were used in the construction of a building; and this view is strengthened by the further provision of the contract that in case they were adopted such architect was thereby employed to superintend the erection of the building. The contract assumes the necessity of the erection of a building following the adoption of a plan as the consummation of the act of acceptance. That the defendant preferred the plaintiff’s plans over others presented to him, falls short of what is required to constitute an adoption of plans for the erection of a building. This requires a determination to build as well as an inspec*600tion of plans for building. It constitutes something more than a mere mental emotion, and in order to perfect it demands a resolution to use those plans in the prosecution of work already determined upon. The learned referee had much difficulty over this point but seems finally to have concluded that the defendant’s preference amounted to a qualified adoption which would charge him with liability under the contract. We do not think that this was the adoption required by the contract.
For the reasons stated, the judgments of the general term and of the referee should be reversed and a new trial ordered with costs to abide the event.
All concur, except Andrews, J., not voting.