Dec 122017
Turbo Pascal source for Monopoly game.
File TPMONO.ZIP from The Programmer’s Corner in
Category Pascal Source Code
Turbo Pascal source for Monopoly game.
File Name File Size Zip Size Zip Type
BOARD.INC 2606 831 deflated
MONOPLY.DTA 3960 1326 deflated
MONOPLY2.INC 15242 3643 deflated
MONOPOLY.COM 50826 27560 deflated
MONOPOLY.DOC 21025 6767 deflated
MONOPOLY.PAS 57794 11167 deflated
TITLE.INC 2222 664 deflated
WINDOW.INC 3002 958 deflated
ZGROUP.INC 11746 2472 deflated

Download File TPMONO.ZIP Here

Contents of the MONOPOLY.DOC file

By Richard Lovett
CIS#: 75425,666

This program was written as an exercise in Turbo Pascal. I hope
you enjoy playing it as much as I did writing it. The program
requires no graphics card, and the source code is included so you
can make any changes you desire.

Turbo Monopoly allows two to four persons to play. (At least in
the present version, you cannot play against the computer. Maybe
in a future version.) If you want, you can save a partially
completed game to disk and resume it later where you left off.
Turbo Monopoly will keep track of all money and property, roll
the dice, enforce the rules and continually update the playing
board. As much flexibility was put into the program as possible
so that you can do all of the things you'd do in the actual
Parker Brothers game. Incidentally, this game was not meant in
any way to infringe on the original copyrighted Monopoly game.
In fact, you'll enjoy Turbo Monopoly a lot more if you have the
Parker Brothers game to refer to.

A sincere effort was made to follow standard Monopoly rules. The
only known deviations are as follows:

1. The official rules state that when buying houses, an
owner must build evenly. For example, if you own the
yellow group of properties and buy three houses, then
strictly speaking you are supposed to put one house on
each of the three properties. Turbo Monopoly requires
even distribution, but only to a point. If you buy
three houses, the program will allow you to put all
three on one property. But the next time you buy houses
for that color group, you'll be forced to put them on
one of the other two properties in the group. This
requirement for building on one of the properties with
the least houses will occur whenever you buy houses or
hotels for the group.

2. The program gives you the option to put all fines and
penalties in a pot and pay them to whoever lands on Free
Parking--a rule modification that a lot of players seem
to like. If you're a purist, you can forego this option;
in that case, nothing special will happen when you land
on Free Parking.

3. When you draw a "get out of jail free" card, the program
simply adds $50 to your cash holdings. Since there are
no actual cards to hold or trade, this seemed like a
reasonable compromise.

4. In the original Monopoly, the bank can run out of houses
to sell, and would-be buyers then have to wait until a
house is turned back in or sold to the bank. Turbo
Monopoly's bank has an endless supply of houses and
hotels. It wouldn't be hard to modify the program and

Page 1

create a limit if you want one. Unless I've lost some
pieces, my original Monopoly game came with 34 houses
and 13 hotels.

5. A player who has bought a mortgaged property is supposed
to pay the bank 10 percent interest if he doesn't lift
the mortgage immediately, plus another 10 percent when
he does lift it. Turbo Monopoly only charges the 10
percent once, when the mortgage is lifted.

6. Turbo Monopoly doesn't have the players roll dice to
determine who goes first. Play will be in whatever
order you enter the names. If you're a stickler, get
some dice and determine the order before entering the

Files in the ARCed version of Turbo Monopoly should include:

MONOPOLY.COM The executable program file
MONOPOLY.PAS The main source code file
MONOPLY2.INC Part two of the main source code
TITLE.INC Displays the title screen
BOARD.INC Displays the playing board
WINDOW.INC The main windowing routine
ZGROUP.INC The Chance and Community Chest routines
MONOPLY.DTA Data to initialize the variables

MONOPOLY.COM and MONOPLY.DTA must be on the same disk and
subdirectory when you run the program.

Turbo Monopoly begins with a title screen that shows you how
houses, hotels and the "mortgaged" flag will be represented on
screen. You also are asked at this point whether you want to
load a game in progress from disk. If you had previously saved a
partially completed game, press Y to load and continue it.
Otherwise, press N.

Assuming you answer no, you will be asked how many persons are
playing and prompted for their first names. You'll also be asked
whether you want to put fines into a Free Parking pot.

Once play is underway, each player's dice roll and the outcome
will be shown on screen. Each player's total cash will be
constantly displayed below the playing board, and if you elected
to collect the fines in a Free Parking pot, the current total
will be shown on the Free Parking square. When a player buys
houses or hotels, Turbo Monopoly will display them on the proper
square. If a property is mortgaged, the computer will label the
square "mort" in reverse video.

A player landing on an unsold property will be told the price and
asked if he wants to buy it. If he declines, or doesn't have
enough money, the property will be auctioned. When that happens,
the players will be asked to bid orally among themselves and then
to type in the winning bid. Names of the players will displayed

Page 2

and numbered; the number (rather than the name) of the winning
bidder should then be entered. Turbo Monopoly will deduct the
purchase price from the winning bidder's cash and assign him
title to the property.

After his move, the player normally will be asked, "Conduct
other business (Y/N)?" Pressing Y calls up the Other Business
menu, which has the following choices:

(H)orsetrade with opponent
(B)uy houses or hotels
(L)iquidate houses or hotels
(R)eview what you own
(G)et list of unsold properties
(V)iew players' positions
(C)ontinue game
(E)nd game
(S)ave game and quit

Press the appropriate letter key to indicate your choice. Here
is what the various options do:

HORSETRADE WITH OPPONENT--This option lets you buy, sell and
trade properties with opponents. If more than two persons are
playing, opponents' names will be listed and you're asked to
specify the number (rather than the name) of the person you're
horsetrading with.

The following types of transactions can be made when horsetrading:

1. Money only
2. Property only
3. Both
4. Declare debt paid

Option 4 is only displayed if you've just landed on one of the
opponent's properties and owe him more rent than your cash on
hand. This option exists in case your opponent for some reason
wants to let you off the hook. More on paying debts later.

BUY HOUSES OR HOTELS--If you choose this option, the computer
will show you the residential properties you own (i.e., those on
which you can build houses, as opposed to railroads and

NOTE: Whenever Turbo Monopoly shows you a list of
properties, three other things also will be shown. One is a
two-letter abbreviation representing the group the property
is in. As you probably know, residential properties are
grouped by color--Park Place and Boardwalk are both dark
blue, for example. The other groups are the railroads and
the utilities. If the property has any buildings on it,

Page 3

little block graphics of those also will be shown beside the
property name. Finally, if the property is mortgaged, the
abbreviation "mort" will appear in reverse video beside the

The group abbreviations are:

dp -- Dark purple lb -- Light blue
lp -- Light purple or -- Orange
rd -- Red ye -- Yellow
gr -- Green db -- Dark blue
rr -- Railroad ut -- Utility

When buying a building, the residential properties you own will
be numbered, and you'll be asked to enter the number of the
property that's to receive the houses or hotel. Turbo Monopoly
will verify that you own all properties in the color group, as
required by the rules. If you do, you'll be told the cost of a
house and asked how many you want. Five houses equals a hotel.
If you don't have enough money to buy the houses you specified,
the program will tell you that, too.

LIQUIDATE HOUSES OR HOTELS--The rules require you to sell
buildings on any property being mortgaged or transferred to
another player, but that's not what "Liquidate houses or hotels" is
for. (The program will automatically enforce the liquidation
rule when the need arises.) The "liquidate" option exists to
give you the opportunity to sell houses or hotels voluntarily--as
when, say, you want to raise the cash to buy an unsold property
you just landed on. As provided for in the rules, houses or
hotels are sold back to the bank for half of what you originally
paid for them.

REVIEW WHAT YOU OWN--Since there are no actual deed cards to look
at, this option gives you an on-screen list of all properties you

GET LIST OF UNSOLD PROPERTIES--As the name implies, this option
shows you a list of the properties still unsold.

MORTGAGE--When you owe more in rent or penalties than you have in
cash, the program will require you to mortgage, horsetrade,
declare bankruptcy or end the game. That's not what this option
is for. As with the "liquidate" option above, it exists to give
you the flexibility to mortgage voluntarily when you need cash
for a property or building purchase. If you elect to mortgage a
property that has buildings on it, Turbo Monopoly will force you
to first sell the buildings back to the bank for half of what you
paid for them, as required by the rules.

UNMORTGAGE--Use this option to pay off a mortgage. As noted
earlier, you'll also be charged 10 percent interest.

VIEW PLAYERS' POSITIONS--Since there was no room on the playing
board to show players' positions, this option gives you the name
of the square each player is on at the moment.

Page 4

CONTINUE GAME--Choose this option to exit the Other Business menu
and resume play.

END GAME--This option asks you to confirm your intent, then exits
to DOS without saving the game status to disk.

SAVE GAME AND QUIT--You'll be asked to confirm your intent, and
then pressing a key saves the game to disk, ready for you to
resume later. The game is saved under the filename MONOPLY.GAM.
If you want to save more than one game, change disks before
executing the save, since otherwise the new MONOPLY.GAM file will
overwrite the previous one.


Let's say you and your opponent Fred have agreed that Fred will
trade you his Boardwalk for your Oriental Avenue and $100. (Fred
isn't very bright.) It doesn't matter whether you make the
transaction on Fred's turn or yours, but we'll assume it's your
turn and you've answered yes when asked "Conduct other business

Select the (H)orsetrade option and, if there are more than two
players, specify Fred as the opponent to horsetrade with. Since
the transaction will involve both cash and property, select #3
("Both") when asked what type of transaction you're making.

You'll first be asked to make the money transaction. Follow the
on-screen instructions, specifying that the money is to go from
you to Fred. Then enter $100 as the amount.

Next you'll be asked to specify who the property is being
transferred from and who it's going to. We'll assume that you
first indicate that a property is going from you to Fred. You'll
be shown a numbered list of your own properties and you can
select Oriental Avenue by entering the correct number. The
computer will confirm that Fred is now the owner of Oriental, and
you'll be asked if you want to make another property transfer.
Answer yes, and this time specify that Fred is the giver and you
are the recipient. Then Fred will see a list of his properties
and can transfer Boardwalk to you by entering its number. If
you're done, you can exit back to the Other Business menu and
press C to continue play.


Now let's suppose you build a hotel on Boardwalk and poor dumb
Fred, who has only a few bucks on hand, lands on it. The computer
will inform him that he lacks the money to pay you rent, and will
tell him how much he needs to raise.

Page 5

He'll then automatically be taken to a menu of options, which
for lack of a better name we'll call the Player in Trouble
menu. The options are:

(M)ortgage property
(D)eclare bankruptcy
(P)ray for a miracle
(E)nd the game

As noted earlier, when you mortgage a property you must first
sell any buildings on that property--and on any others in the
same color group--back to the bank. Selecting the Mortgage
option will result in a list of your unmortgaged properties, and
you can select the property you want by number. If buildings
exist, the computer will tell you what they will net you when
resold to the bank and you'll have a chance to approve or
disapprove that building sale. Then you'll have one last chance
to approve or disapprove the mortgage transaction itself.

The cash from the building sale and mortgage transactions will be
put in your account, and the computer will show you in the top
right corner of the screen how much more money, if any, you still
need in order to satisfy whatever debt you just incurred. If the
indicator reads zero, you can exit the Mortgage section and
continue play. If the mortgaging raised more money than you
needed to pay the debt, the excess will be left in your cash

Horsetrading is another way to satisfy a debt. If the debt is to
another player, you can try to get that player to accept some of
your property--or a combination of property and cash--in payment.
The computer will ask after each exchange of money or property,
"Did that transaction satisfy (player name)'s debt?" Answering
yes at any point will allow play to continue. Otherwise, the
computer will keep forcing you to choose one of the Player in
Trouble options until your cash on hand is enough to satisfy the

You can also press P to pray for a miracle. You will find this
option amusing but not much help financially.

If you lack the resources to pay the debt, you will probably have
to press D and declare bankruptcy. Once you've confirmed your
intent, the computer will give all your assets to the player
you're indebted to, or to the bank if you were trying to pay a
penalty of some sort. If your bankruptcy leaves only one active
player, that will automatically end the game and the computer
will give you a final accounting of everyone's assets. If two or
more active players remain, your name will be deleted from the
bottom line of the playing board and play will continue.

If you select E to end the game, the computer will give a final
tally of everyone's assets and exit to DOS. The status of the
game will not be saved to disk.

Page 6

CHANCE AND COMMUNITY CHEST--When a new game starts (as opposed to
one saved to disk and resumed later), the computer will randomly
select the first Chance and Community Chest cards to be drawn.
However, the cards will always be in the same order. When you
draw a card, the computer will tell you what it reads and carry
out the required action.

INCOME TAX--If you land on this square, the computer will ask if
you want to (P)ay $200 or (C)alculate 10% of worth. Press the
appropriate letter key to indicate your choice. The Calculate
option totals up your holdings in buildings, cash and property,
and your tax is 10 percent of the total. Once you select one of
the two options, you can't change your mind.

JAIL--As in the regular game, you can try to throw doubles and
get out, or you can pay $50. If you pay, the computer will throw
the dice and give you a move during the same turn, as provided
for in the rules. If you fail to throw doubles after three
tries, the computer will deduct $50 from your cash and inform you
that you had to pay to get out. You will then get a move during
that turn. If you lack the $50 to get out of jail, the computer
will tell you and, if necessary, take you to the Player in
Trouble menu.


Plenty of room exists for enhancements in this version of Turbo
Monopoly. Things you may want to consider adding are:

1. A clock so that players can play against a time limit.

2. Some method to display players' positions on the board.

3. The ability to save multiple games to disk.

4. The ability to play against the computer.

5. The option for a short game in which ownership of all
properties is assigned randomly by the computer at the

6. Additional music or sound effects beyond the brief
funeral dirge played when a player goes bankrupt.

I would appreciate hearing from you if you have made improvements
or have found bugs in the program. I am making the source code
available so that I can learn from you at the same time you are
(hopefully) enjoying the game.

Richard Lovett
6649 Oak St.
Kansas City, Mo. 64113
CIS# 75425,666
Sysop, City Hall BBS (816-274-2603)

Page 7

 December 12, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>