
78 P.3d 685 (2003)
2003 WY 138
ALPINE CLIMATE CONTROL, INC., Appellant (Plaintiff),
v.
DJ'S, INC., d/b/a DJ's Thriftway; and Dennis Dobbin, Appellees (Defendants).
No. 02-213.
Supreme Court of Wyoming.
October 30, 2003.
*687 Representing Appellant: Brian N. Beisher of Hart & Beisher, Sheridan, Wyoming.
Representing Appellee: Timothy J. Kirven and Robert E. Pfister II of Kirven and Kirven, P.C., Buffalo, Wyoming.
Before HILL, C.J., and GOLDEN, LEHMAN, KITE, and VOIGT, JJ.
GOLDEN, Justice.
[¶ 1] In this breach of contract action, Appellant Alpine Climate Control, Inc., appeals from a jury verdict for the Appellee DJ's Inc., contending that the trial court improperly refused to instruct the jury on its theory that DJ's had breached the contract by actions that had prevented complete performance. Alpine claimed that performance was prevented when DJ's would not permit Alpine to perform warranty work to correct deficiencies. After reviewing the evidence and the instructions as a whole, we find that Alpine has failed to show any prejudice from the trial court's failure because the evidence adduced at trial did not support giving the instruction.
[¶ 2] We affirm the order of judgment for DJ's.

ISSUES
[¶ 3] Alpine presents the following issue for our review:
A. Did prejudicial error result from the District Court's refusal to give Appellant's proposed jury instruction regarding preventative performance?
DJ's presents two issues for our review:
A. Has Appellant failed to properly preserve its claim of prejudicial error by the District Court in refusing to give Appellant's proposed jury instruction?
B. Did the District Court properly refuse to give Appellant's proposed jury instruction regarding preventive performance of a contract where Appellant had completed its work and tendered its invoice?

FACTS
[¶ 4] Alpine is a corporation based in Sheridan, Wyoming, with the primary purpose of installing and maintaining heating and cooling equipment. DJ's operates a retail grocery store known as DJ's Thriftway that is located in Buffalo, Wyoming. Alpine had performed service work for DJ's for a long period of time, and in October of 2000, the parties agreed that Alpine would install freezers and compressors at DJ's on a time and materials basis. Alpine's service manager had indicated that the cost of installation might be as low as $15,000.00, but a written contract price was not set. Between October 24, 2000, and December 28, 2000, Alpine was at the store on an almost daily basis, incurring 441.75 hours of labor for which it submitted an invoice in the amount of $22,087.50. After materials and other services were included, Alpine billed DJ's for an amount totaling $29,339.45.
[¶ 5] DJ's paid $15,000.00 but refused to pay the remainder, and Alpine filed suit on June 22, 2001, for the unpaid balance. DJ's counterclaimed, and, at trial, the jury was instructed that DJ's contended that Alpine breached the contract and breached the warranty by failing to properly install the equipment. At trial, DJ's contended that Alpine had essentially completed installation the week after Thanksgiving, but was called numerous times to service the malfunctioning equipment during November and December. On December 25, 2000, the equipment failed completely, and although the record shows that Alpine returned for fifteen hours on December 27 and 28, DJ's contacted another company which discovered significant deficiencies *688 with Alpine's work. Between December 26, 2000, and January 30, 2001, DJ's incurred expenses of over $13,000.00 to have the other company correct those deficiencies so that the equipment operated properly.
[¶ 6] Alpine contended that it was ready, willing and able to perform warranty work and correct any problems with the equipment but that DJ's banned it from the premises, preventing it from performing the warranty work. Alpine requested a jury instruction regarding prevented complete performance that was refused by the trial court. The jury rendered a verdict for DJ's, and the trial court entered judgment against Alpine in the amount of $9,347.77. This appeal followed.

DISCUSSION
[¶ 7] Alpine contends that the trial court erred when it refused an instruction regarding its theory of the case. That instruction stated:
Where one party to a contract prevents complete performance of the contract by the other party, the party preventing performance has breached the contract.
Alpine contends that it was prejudiced by the trial court's refusal because the jury found that it had breached the contract although DJ's refused to allow warranty work to correct problems with the system. DJ's contends that this issue was not preserved for review under the requirement of W.R.C.P. 51(b)[1] that Alpine objected to the refusal and provided the grounds for its objection. It further contends that the instruction was not supported by the evidence, and, therefore, its refusal was not prejudicial.

Standard of Review
[¶ 8] "[A] party is entitled to have a jury instruction upon its theory of the case but only if such theory is supported by competent evidence and a proper request for the instruction is made." Short v. Spring Creek Ranch, Inc., 731 P.2d 1195, 1199 (Wyo.1987). The record does not indicate that Alpine objected to the trial court's refusal of the instruction; however, its contention that the refusal was prejudicial because it deprived Alpine of an instruction on its theory of the case requires that we apply our plain error standard of review.
[¶ 9] That standard requires (1) that the record reflects clear and unequivocally the fact complained of; (2) that the facts prove a transgression of a clear rule of law; and (3) that the error affects a substantial right that is materially prejudicial. Triton Coal Co., Inc. v. Mobil Coal Producing, Inc., 800 P.2d 505, 511 (Wyo.1990). The plain error doctrine is infrequently applied in our cases where a party has failed to object to a jury instruction. Id. Unless an instructional error can be said to have plainly caused a fundamental prejudice to the defendant's legal rights, we will not overturn a verdict on appeal unless the instruction was objected to during the trial and a proper instruction was offered in its place. Id. at 512 (citing Gore v. State, 627 P.2d 1384, 1388-89 (Wyo.1981)).
[¶ 10] We review the propriety of jury instructions by reviewing all as a whole to see if they adequately and clearly advise the jury of the applicable law. Sellers v. Dooley Oil Transport, 2001 WY 44, ¶ 9, 22 P.3d 307, 309 (Wyo.2001). The function of jury instructions is to give guidance regarding the applicable law. Id. The trial court is not obligated to give an instruction offered by a party as long as the jury is adequately instructed on the law as it pertains to that case. Id. The trial court's ruling on an instruction must be prejudicial to constitute reversible error. Prejudice results when the *689 instructions confused or misled the jury with respect to the proper principles of law. Id.
[¶ 11] In reviewing the evidence, we will assume the evidence in favor of the successful party is true, leave out of consideration entirely evidence of the unsuccessful party in conflict with it, and give to the evidence of the successful party every favorable inference which may fairly be drawn from it. Moberly Asphalt Maintenance, Inc. v. Royal Associates, Ltd., 618 P.2d 1347, 1351 (Wyo. 1980).

Jury Instructions
[¶ 12] Building and construction contracts contain a warranty either express or implied that the work will be sufficient for a certain purpose and will be performed in a skillful, careful, diligent, and workmanlike manner. Matheson Drilling, Inc. v. Padova, 5 P.3d 810, 812 (Wyo.2000); Arch Sellery, Inc. v. Simpson, 360 P.2d 911, 912 (Wyo. 1961). The contract is not performed until the work accomplishes the agreed result. Arch Sellery, 360 P.2d at 912; see also Kansas Turnpike Authority v. Abramson, 275 F.2d 711, 713 (10th Cir.1960) (where the principal object of the contract is to obtain a result, the builder is required to accomplish that purpose or result). Complete performance of a contract is proved by substantial performance that will exist even though there are minor defects that must be corrected at the expense of the contractor. Pacific-Wyoming Oil Co. v. Carter Oil Co., 31 Wyo. 314, 328-29, 226 P. 193, 198 (1924); Finley v. Pew, 28 Wyo. 342, 361-62, 205 P. 310, 317 (1922).
[¶ 13] When a party prevents performance by the other party, the nonperformance is excused, and the party preventing performance is in breach of contract. Chandler-Simpson, Inc. v. Gorrell, 464 P.2d 849, 852 (Wyo.1970); Sturgeon v. Phifer, 390 P.2d 727, 730 (Wyo.1964); Thatcher v. Darr, 27 Wyo. 452, 479, 199 P. 938, 947 (1921); see also 9 Arthur L. Corbin, Corbin on Contracts § 947, at 722 (int. ed.2002) (performance that was prevented or substantially hindered is a defense); 17B C.J.S. Contracts § 529, at 189 (1999). The excuse of nonperformance by prevention does not apply when the contractor's own performance is insufficient to achieve the contract's purpose. See Sturgeon, 390 P.2d at 729-30. Whether a party has prevented performance is a question of fact for the jury. Chandler-Simpson, 464 P.2d at 852.
[¶ 14] Alpine's owner testified that he considered the project complete at the end of November because the equipment was up and running. He acknowledged that Alpine continued to return in December; however, he contended the services provided were to finish tasks not critical to the functioning of the equipment. Because the December invoice did not provide a breakdown of charges, a revised invoice was sent on January 9, 2001. It showed that Alpine returned to DJ's numerous times between December 1 and December 28, 2000, and expended about 104 hours on the contract. The invoice stated that eleven hours of warranty work were performed after October 24, 2000, but did not specify on which dates the warranty work occurred. The only express terms of the warranty stated that Alpine's workmanship warranty extended for one year from the date of the invoice. Nothing in the record indicates any evidence of an agreement that Alpine would not be liable for defective workmanship if notice and an opportunity to correct the defects were not given by DJ's.
[¶ 15] Despite Alpine's completion of installation and performance of warranty work, testimony at trial indicated that the system experienced significant problems in November and December and failed on Christmas Day of 2000. Alpine was called but did not show up, and another contractor began working on the system on December 26, 2000, and continued to work on it until January 30, 2001. Alpine's invoice stated that fifteen hours of labor was provided on December 27 and 28. The second contractor testified that his work was to remedy Alpine's defective workmanship and provided detailed descriptions of many problems requiring correction. His invoice for work and parts to correct the defective workmanship totaled over $13,000.00.
[¶ 16] This record shows that the jury had evidence that Alpine believed that it had *690 completed its performance on the contract at least by early December when it submitted an invoice to DJ's. Despite this belief, the evidence indicates that Alpine continued to work on the system, that Alpine's owner believed that some of this work was for warranty purposes, that beginning December 26, another contractor began working on the system, and that Alpine returned on December 27 and 28 to work on the system. These facts show that Alpine was not prevented from any performance by DJ's. Without evidence to support giving an instruction about prevented performance, the trial court properly refused it.
[¶ 17] The evidence, however, did require instructions regarding defective workmanship. A cause of action for defective workmanship is available against a contractor either as breach of contract or negligence or both. Cline v. Sawyer, 600 P.2d 725, 732 (Wyo.1979). The following instructions were provided to the jury:
WarrantyIn General
A warranty is defined as an affirmation of fact or promise by the seller of items possessing certain characteristics. A warranty may be made expressly and in so many words by the seller either in writing or orally or it may be implied by law from the circumstances of the contract.
Breach of Warranty
In construction contracts, there is an implied warranty that the work will be performed in a skillful, careful, diligent and workmanlike manner.
Measure of DamagesWarranty
If you find that Alpine Climate Control, Inc. breached the implied warranty, DJ's Inc. is permitted to recover those reasonably foreseeable damages that directly resulted from the breachthat is, such an amount as would place it in the condition it would have been in if Alpine Climate Control, Inc. had adequately installed the refrigeration equipment.
[¶ 18] Instructions provided to this jury also defined contract formation, breach of contract, and explained contract damages. Regarding performance, the jury was instructed that if Alpine performed "as required by the terms and conditions of the contract, and DJ's, Inc. failed to perform as required by the contract," then Alpine could recover any damages that it suffered. The jury was instructed that if Alpine failed to properly install the refrigeration equipment as agreed to by the parties, then DJ's could recover the damages that it suffered. Reviewed as a whole, these instructions adequately describe the law as it pertains to the evidence presented in this case.
[¶ 19] By its judgment, the jury determined that DJ's did not breach the contract by failing to pay Alpine the balance due on the invoice. The jury also determined that Alpine's performance did breach the contract and awarded DJ's damages. The evidence supports this verdict.
[¶ 20] The order of judgment is affirmed.
NOTES
[1]  (b) Further instructions; objections.At the close of the evidence or at such earlier time during the trial as the court reasonably directs, any party may file written requests that the court instruct the jury on the law as set forth in the requests. The court shall inform counsel of its proposed action upon the requests prior to their arguments to the jury. Before the argument of the case to the jury has begun, the court shall give to the jury such instructions on the law as may be necessary and the same shall be in writing, numbered and signed by the judge, and shall be taken by the jury when it retires. No party may assign as error the giving or the failure to give an instruction unless that party objects thereto before the jury retires to consider its verdict, stating distinctly the matter objected to and the grounds of the objection. Opportunity shall be given to make the objection out of the hearing of the jury.
