delivered the Opinion of the Court.
The District Court of the Thirteenth Judicial District, Yellowstone County, found defendant, Imagineering, Inc., liable for breach of contract and breach of implied warranty. The court entered judgment in favor of plaintiff, MPH Company, in the amount of $193,663 plus interest. Imagineering appeals. We reverse.
The sole issue raised on appeal is whether the contract entered into by the parties was illegal under the laws of Montana and therefore unenforceable.
Defendant and appellant, Imagineering, Inc., is a Nevada corporation engaged in the design and manufacture of electronic video machines. Plaintiff and respondent, MPH Company, is a joint venture comprised of Sam McDonald, Jr., Paul Pendergrass and Ronald Harding, all of Billings, and Joe Goott of Salt Lake City. Goott is also the president of Tropic Industries, a Utah corporation.
In January, 1984, MPH and Tropic entered into a contract with Imagineering wherein Imagineering agreed to design and manufacture an electronic Poker All Keno machine. This machine was to be the electronic version of the table game developed and patented by Joe Goott. A detailed description of the table game can be found in our decision Goott v. State, 630 P.2d 232, 38 St.Rep. 1037 (Mont. 1981). In Goott, we found that, although the game possessed some of the characteristics of poker, it was essentially a variation of keno. *344We held that the game was illegal under the Montana Card Games Act (then codified at secs. 23-5-301 through -332, MCA). On remand, the District Court declared that the game was legal under the Bingo and Raffles Law (then codified at secs. 23-5-401 through -431, MCA.
The contract specified that the electronic version of Poker All Keno was to be a single-player, stand-up video game designed with a reset key to allow the player to cash in his accumulated credits. The image projected on the screen was to be the same as that found on the Poker All Keno table layout. The game would be played by positioning a chip on the layout by means of four separate directional buttons. Once the player made his selection, he would place a bet by either inserting coins or pushing the “bet” button. After placing his bet, the player would start the game by pushing the “start” button. The start button would activate a card selection device, which was a bowl-shaped container with a spinning wheel in the bottom and 52 pockets around the periphery, each pocket representing a different card from a standard deck of cards. From the “pocket” selections of the last game, six balls would be dumped into the bowl. The spinning wheel would continue to randomly bounce the balls around until each found a pocket. As each ball entered a pocket, it would close a switch, sending information to the computer. The computer would then display the selected betting squares on the screen. After the sixth ball found its pocket, the computer would compute the results of the best possible poker hand by using 5 out of the 6 selected cards. It would then display the results on the screen by calculating the total winnings and advancing the credit meter accordingly.
The parties encountered a variety of problems with the machines and were forced to modify the contract on several occasions. In December, 1984, a prototype was delivered to MPH in Billings. MPH found the machine acceptable and ordered 20 units in kit form for assembly in Billings. MPH subsequently increased the order to 24 machines, also in kit form.
That December, Imagineering contacted the Nevada gaming authorities, who told the company that the machine would be illegal in Montana because it incorporated certain components that enabled the game to be played for cash. These illegal components included devices to display the last credits cleared, coin out meters and cancel credit switches, also known as reset keys. After consulting with the Nevada authorities, Imagineering discussed the problem with MPH. Imagineering agreed to send the machines to MPH in Montana without the illegal parts but with wiring and circuitry designed to *345accommodate the components should MPH wish to install them itself.
After shipping the games, Imagineering sent employees to Montana to explain the assembly of the machines to technicians hired by MPH. While in Montana, the Imagineering employees showed the MPH technicians how to install the electrical components that Imagineering had refused to install in Nevada. In fact, Imagineering furnished extra parts for this purpose, although it appears that the parts were available on the general market and could have been found in any Radio Shack store.
The kits were delivered in March, 1985. They were assembled in April of that year and subsequently installed in bars in Billings, Great Falls and other locations in Montana. The machines placed in the Montana bars were equipped with components permitting them to be played for cash.
Although the machines worked in the lab, they did not operate properly in the electronically “dirty” environment of the local drinking establishments. Among other problems, the machines frequently registered unearned credits. Fearing that they would have to pay out more in cash winnings than the machines were bringing in, the bar owners asked MPH to remove the games from their establishments.
Imagineering sent several technicians to Montana in an attempt to cure the problem. The technicians were unsuccessful in their endeavors, and in May and June, 1985, MPH pulled the games out of the taverns.
MPH and Tropic instituted suit against Imagineering and its president, Bill R. Williams, alleging breach of contract, breach of warranty, fraud and bad faith. Imagineering and Williams defended on the basis that the contract was illegal and therefore unenforceable.
Tropic’s claims were dismissed with prejudice. Later, the remaining parties stipulated to dismissal of all claims against Williams as well as MPH’s claims of fraud and bad faith against Imagineering.
In lieu of trial, MPH and Imagineering submitted the case to the District Court based on the record and a set of stipulated facts. The parties stipulated that the video machines contained design defects rendering them commercially unacceptable and constituting a breach of contract.
The District Court found that the machines were in compliance with Montana law at the time the contract was to be performed and that the contract, as amended, was legal and enforceable. The court entered judgment in favor of MPH in the amount of $193,663 plus *346pre-judgment interest of $79,354. The principal represented funds expended by MPH in satisfaction of the contract.
Imagineering argues that the electronic Poker All Keno machines contemplated by the parties were illegal slot machines because they were intended to be and actually were played for cash. We agree that Montana statutes and interpretive case law prohibited the type of gambling devices for which the parties contracted and that the machines were, at best, unlawful slot machines.
The Montana Constitution prohibits gambling unless specifically authorized.
“All forms of gambling, lotteries, and gift enterprises are prohibited unless authorized by acts of the legislature or by the people through initiative or referendum.”
Art. HI, sec. 9, Mont. Const. (1972).
At the time the parties entered into and performed the contract in question, Montana law prohibited the possession or operation of slot machines. Section 23-5-104, MCA (1983) (amended 1989 and renumbered sec. 23-5-153). A slot machine was defined in sec. 23-5-101(1), MCA (1983) (amended 1989 and renumbered sec. 23-5-112(29)), as follows:
“[A] machine operated by inserting a coin, token, chip, trade check, or paper currency therein by the player and from the play of which he obtains or may obtain money, checks, chips, tokens, or paper currency redeemable in money.”
In 1974, the legislature enacted the Montana Card Games Act, ch. 293, sec. 1, 1974 Mont. Laws 727, and the Bingo and Raffles Law, ch. 294, sec. 1, 1974 Mont. Laws 731. The Montana Card Games Act authorized certain enumerated card games, including poker. Section 23-5-311, MCA, (1983) (amended 1989). The authorized card games could be played for cash. Sections 23-5-302, MCA, (1983) (repealed 1989) and 23-5-312, MCA, (1983) (amended 1989). At the time the parties entered into the contract, the Bingo and Raffles Law authorized playing bingo for prizes of tangible personal property only. The law expressly forbade bingo prizes of cash or other intangible personal property. Section 23-5-412, MCA, (1983) (amended 1985 and 1989). In 1976, this Court considered the legality of electronic keno games under the Bingo and Raffles Law. In Treasure State Games, Inc. v State, 170 Mont. 189, 551 P.2d 1008 (1976), we upheld the legality of electronic keno under these laws, concluding that electronic keno machines were merely the mechanical simulation of the lawful game of bingo. We did not consider whether such machines could be *347legally played for cash prizes.
In 1981, Joe Goott, one of the members of MPH, brought a declaratory judgment action in the Silver Bow County District Court, seeking to have the table version of Poker All Keno declared lawful. The District Court held that the game was lawful under the Card Games Act. On appeal, we reversed, reasoning that Poker All Keno was a “casino-type of banking game” that pitted players against the house rather than against each other, an activity that the legislature did not intend to authorize when it enacted the Card Games Act. Goott, 630 P.2d at 234, 38 St.Rep. at 1039. On remand, the District Court held that Poker All Keno was legal under the Bingo and Raffles Law, which left the game subject to the prohibition against cash prizes.
The following year, we were presented with the opportunity to determine the legality of live keno games. In Gallatin County v. D & R Music and Vending, Inc., 201 Mont. 409, 412, 654 P.2d 998, 1000 (1982) (Gallatin I), we held that live keno came within the statutory definition of the game of bingo and was therefore legal under the Bingo and Raffles Law. MPH claims that Gallatin I also authorized the playing of keno for cash because the stipulated description of keno presented by the parties described the amount of cash paid for winning the game. It appears, however, that the question of whether the game was legally played for cash prizes was not presented to this Court. Rather, the issue in Gallatin /was whether the game of keno conformed with the legal description of binngo under Sec. 23-5-402(1) (A), MCA (1981) (repealed 1989). Because we did not, in Gallatin I, discuss the legality of playing keno for cash, it cannot be said that the case authorized such activity. In fact, Gallatin I could not possibly have legalized playing keno or any other form of bingo for cash when Sec. 23-5-412, MCA, as it stood in 1982 expressly proscribed such activity.
Any question that Gallatin I permitted playing electronic keno for cash prizes was clarified by the legislature’s amendment to sec. 23-5-412, MCA, in April, 1985, the same time that the Poker All Keno machines that form the basis of this action were being assembled and placed in bars in Montana. The statute was amended to read as follows:
“Bingo prizes may be paid in either tangible personal property or cash, except that a prize must be paid in tangible personal property if the same is played on a player-operated electronic video game machine. ” (Emphasis added).
Section 23-5-412, MCA (enacted April 12, 1985). Thus, while the *348amended statute authorized cash prizes for live bingo games, it continued to prohibit prizes of intangible personal property for electronic versions of the game.
In February, 1984, shortly after the parties entered into the contract for the manufacture of Poker All Keno machines, this Court decided Gallatin County v. D & R Music and Vending, Inc., 208 Mont. 138, 676 P.2d 779 (1984) (Gallatin II). Using much the same reasoning as that employed in Goott, we held that electronic poker machiunes were not authorized under the Montana Card Games actt. We held that electronic poker machines were slot machines, which Sec. 23 5-101, MCA (1983), Expressly barred.
In 1985, the legislature passed the Video Draw Poker Machine Control Law, Ch. 720, sec. 1, 1985 Mont. Laws 1649. While this act legalized video draw poker machines and authorized playing those machines for cash prizes, it did not authorize playing Poker All Keno for cash. Instead, the law was expressly limited to machines offering the game of draw poker. Section 23-5-606(4), MCA (1985) (amended 1987 and repealed 1989). Poker All Keno, which possessed elements of both the game of poker and the game of keno, was not draw poker as that game was defined in sec. 23-5-606(4), MCA (1985). Thus, the passage of the Video Draw Poker Machine Control Law did not legalize the electronic version of Poker All Keno.
It is clear from the statutes and the case law that, at the time the parties entered into and performed the contract, Montana law forbade playing Poker All Keno for cash prizes. Goott prohibited the table version of the game under the Montana Card Games Act. Gallatin II, which banned electronic draw poker games, emphasized the holding in Goott, i.e., that forms of gambling that pitted a player against the house, whether the games were live or mechanical, were not permitted under the Card Games Act. Although the Video Draw Poker Machine Control Act overruled the holding in Gallatin II by legalizing electronic draw poker machines, the act did not authorize Poker All Keno machines.
Assuming that electronic Poker All Keno machines were legal under the Bingo and Raffles Law, the game could still not be played legitimately for cash. Gallatin /, while holding that electronic keno was a lawM game, did not authorize playing the game for cash prizes, nor could it have done so in the face of the express statutory prohibition against such activity. Furthermore, the 1985 amendment of sec. 23-5-412, MCA, specifically provided that electronic versions of bingo could be played only for prizes of tangible personal property.
*349In light of the above discussion, we must conclude that, at the time the parties entered into and performed the contract, Poker All Keno machines played for cash prizes were not authorized under either the Montana Card Games Act, the Video Draw Poker Machine Control Law or the Bingo and Raffles Law. Consequently, the machines were slot machines as defined in sec. 23-5-101(1), MCA (1983).
Section 28-2-701(1), MCA, provides that a thing or an act is not lawful if it is ‘ ‘contrary to an express provision of law. ’ ’ Slot machines were expressly prohibited by sec. 23-5-104, MCA (1983), at the time the parties entered into and performed the contract. Therefore, Poker All Keno machines, because they were slot machines, were unlawful under Montana law.
“Where a contract has but a single object and such object is unlawful, whether in whole or in part, ... the entire contract is void. ’ ’ Section 28-2-603, MCA. “The object of a contract is the thing which it is agreed on the part of the party receiving the consideration to do or not to do.” Section 28-2-601, MCA. In the present case, the object of the contract was the design and manufacture of Poker All Keno machines. Because the machines were unlawful, the entire contract was void.
A party to an illegal contract may not use the courts of this state to enforce the agreement.
“No principle of law is better settled than that a party to an illegal contract cannot come into a court of law and ask to have his illegal objects carried out, nor can he set up a case in which he must necessarily disclose an illegal purpose as the groundwork of his claim .... The law, in short, will not aid either party to an illegal agreement. It leaves the parties where it finds them. Therefore neither a court of law nor a court of equity will aid the one in enforcing it, or give damages for a breach of it, or set it aside at the suit of the other, or, when the agreement has been executed in whole or in part by the payment of money or the transfer of other property, land its aid to recover it back.” (Emphasis added.)
Glass v Basin & Bay State Mining Co., 31 Mont. 21, 33, 77 P. 302, 305 (1904) (quoting 9 D. Lawson, Cyclopedia of Law and Procedure 546). Accord McPartlin v. Fransen, 199 Mont. 143, 146-47, 648 P.2d 729, 730-31 (1982); McManus v. Fulton, 85 Mont. 170, 182-83, 278 P. 126, 131 (1929).
At oral argument, MPH advanced the theory that the parties’ modification of the contract changed the agreement from an illegal to a legal contract. MPH argued that because the Poker All Keno machines *350shipped to Montana by Imagineering did not include the components enabling them to be played for cash, the machines were legal under Montana law.
We reject this argument for two reasons. First, “[t]he object of the contract must be lawful when the contract is made ....” Section 28-2-602, MCA. The original object of the contract was the design and manufacture of a Poker All Keno machine that could be played for cash prizes. Therefore, the object was not lawful when the contract was made.
Second, although Imagineering may have shipped lawful machines, it appears that the contract was not fully performed at that point. Imagineering sent employees to Montana to oversee the assembly,of the machines and to show MPH’s technicians how to install the parts that would enable the machine to be played for cash. These actions constitute a common scheme or plan to use the machines for illegal purposes within this state. When the general scheme of the contracting parties is to bring about unlawful results, the contract is unenforceable. See 15 Williston on Contracts secs. 1752 and 1755 (3d ed. 1972).
The parties originally planned to manufacture and design illegal gambling machines for use within the state of Montana. The parties did not deviate from the original object of the contract even though the manufacturer shipped lawful machines into this state. The end product — a Poker All Keno machine that could be played for cash prizes — was also the original object of the contract. As the object of the parties was to manufacture and market an unlawful slot machine, the contract was illegal. Neither party may come into The judgment of the District Court is reversed.
CHIEF JUSTICE TURNAGE and JUSTICES HARRISON, BARZ, McDONOUGH and WEBER concur.