Advertisement
Guest User

Untitled

a guest
Nov 19th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 153.18 KB | None | 0 0
  1. #Name: xxxxxxxxxxxxxx
  2. #Date: 11/15/2017
  3. #Class: CSCI I
  4. #Assignment: Semester I Final Project
  5. #Algorithm: Program plays Monopoly
  6. ############################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
  7.  
  8. #Imports RNG
  9. import turtle
  10. import random
  11. import winsound
  12.  
  13. #Defines variables
  14. space = ["Go", "Mediterranean Avenue", "Community Chest 1", "Baltic Avenue", "Income Tax", "Reading Railroad", "Oriental Avenue", "Chance 1", "Vermont Avenue", "Connecticut Avenue", "Jail (Visiting)", "St. Charles Place", "Electric Company", "States Avenue", "Virginia Avenue", "Pennsylvania Railroad", "St. James Place", "Community Chest 2", "Tennessee Avenue", "New York Avenue", "Free Parking", "Kentucky Avenue", "Chance 2", "Indiana Avenue", "Illinois Avenue", "B & O Railroad", "Atlantic Avenue", "Ventnor Avenue", "Water Works", "Marvin Gardens", "Jail", "Pacific Avenue", "North Carolina Avenue", "Community Chest 3", "Pennsylvania Avenue", "Short Line", "Chance 3", "Park Place", "Luxury Tax", "Boardwalk"]
  15. game = 1
  16. turn = random.randint(1, 2)
  17. p1s = 0
  18. p2s = 0
  19. p1m = 2000
  20. p2m = 2000
  21. p1rr = 0
  22. p2rr = 0
  23. p1u = 0
  24. p2u = 0
  25. buy = "x"
  26.  
  27. #Medeterranean Avenue variables
  28. br1 = 0
  29. br1m = 0
  30. br1h = 0
  31.  
  32. #Baltic Avenue variables
  33. br2 = 0
  34. br2m = 0
  35. br2h = 0
  36.  
  37. #Oriental Avenue variables
  38. cy1 = 0
  39. cy1m = 0
  40. cy1h = 0
  41.  
  42. #Vermont Avenue variables
  43. cy2 = 0
  44. cy2m = 0
  45. cy2h = 0
  46.  
  47. #Connecticut Avenue variables
  48. cy3 = 0
  49. cy3m = 0
  50. cy3h = 0
  51.  
  52. #St. Charles Place variables
  53. vi1 = 0
  54. vi1m = 0
  55. vi1h = 0
  56.  
  57. #States Avenue variables
  58. vi2 = 0
  59. vi2m = 0
  60. vi2h = 0
  61.  
  62. #Virginia Avenue variables
  63. vi3 = 0
  64. vi3m = 0
  65. vi3h = 0
  66.  
  67. #St. James Place variables
  68. or1 = 0
  69. or1m = 0
  70. or1h = 0
  71.  
  72. #Tennessee Avenue variables
  73. or2 = 0
  74. or2m = 0
  75. or2h = 0
  76.  
  77. #New York variables
  78. or3 = 0
  79. or3m = 0
  80. or3h = 0
  81.  
  82. #Kentucky Avenue variables
  83. red1 = 0
  84. red1m = 0
  85. red1h = 0
  86.  
  87. #Indiana Avenue variables
  88. red2 = 0
  89. red2m = 0
  90. red2h = 0
  91.  
  92. #Illinois Avenue variables
  93. red3 = 0
  94. red3m = 0
  95. red3h = 0
  96.  
  97. #Atlantic Avenue variables
  98. ye1 = 0
  99. ye1m = 0
  100. ye1h = 0
  101.  
  102. #Ventnor Avenue variables
  103. ye2 = 0
  104. ye2m = 0
  105. ye2h = 0
  106.  
  107. #Marvin Gardens variables
  108. ye3 = 0
  109. ye3m = 0
  110. ye3h = 0
  111.  
  112. #Pacific Avenue variables
  113. gr1 = 0
  114. gr1m = 0
  115. gr1h = 0
  116.  
  117. #North Carolina Avenue variables
  118. gr2 = 0
  119. gr2m = 0
  120. gr2h = 0
  121.  
  122. #Pennsylvania Avenue variables
  123. gr3 = 0
  124. gr3m = 0
  125. gr3h = 0
  126.  
  127. #Park Place variables
  128. bl1 = 0
  129. bl1m = 0
  130. bl1h = 0
  131.  
  132. #Boardwalk variables
  133. bl2 = 0
  134. bl2m = 0
  135. bl2h = 0
  136.  
  137. #Reading Railroad variables
  138. rrr = 0
  139. rrrm = 0
  140.  
  141. #Pennsylvania Railroad variables
  142. prr = 0
  143. prrm = 0
  144.  
  145. #B & O Railroad variables
  146. brr = 0
  147. brrm = 0
  148.  
  149. #Short Line Railroad variables
  150. srr = 0
  151. srrm = 0
  152.  
  153. #Electric Company variables
  154. ec = 0
  155. ecm = 0
  156.  
  157. #Water Works variables
  158. ww = 0
  159. wwm = 0
  160.  
  161. #Free Parking variables
  162. fp = 200
  163.  
  164. #Jail variables
  165. p1j = 0
  166. p1jt = 0
  167. p2j = 0
  168. p1jt = 0
  169.  
  170. #Plays background music
  171. #winsound.PlaySound('night.wav', winsound.SND_LOOP + winsound.SND_ASYNC)
  172.  
  173. #Sets up game board
  174. wn = turtle.Screen()
  175. wn.title("Monopoly")
  176. wn.setup(780, 780)
  177. wn.bgpic("monopoly.png")
  178.  
  179. #Sets up mortgage symbols
  180. mortgage = "mortgaged.gif"
  181. wn.addshape(mortgage)
  182. m1 = turtle.Turtle()
  183. m1.shape(mortgage)
  184. m1.pu()
  185. m1.speed(0)
  186. m1.ht()
  187. m2 = m1.clone()
  188. m3 = m1.clone()
  189. m4 = m1.clone()
  190. m5 = m1.clone()
  191. m6 = m1.clone()
  192. m7 = m1.clone()
  193. m8 = m1.clone()
  194. m9 = m1.clone()
  195. m10 = m1.clone()
  196. m11 = m1.clone()
  197. m12 = m1.clone()
  198. m13 = m1.clone()
  199. m14 = m1.clone()
  200. m15 = m1.clone()
  201. m16 = m1.clone()
  202. m17 = m1.clone()
  203. m18 = m1.clone()
  204. m19 = m1.clone()
  205. m20 = m1.clone()
  206. m21 = m1.clone()
  207. m22 = m1.clone()
  208. m23 = m1.clone()
  209. m24 = m1.clone()
  210. m25 = m1.clone()
  211. m26 = m1.clone()
  212. m27 = m1.clone()
  213. m28 = m1.clone()
  214. m1.setpos(335 - 82 - 63 * 0, -335) #Mediterranean Avenue
  215. m2.setpos(335 - 82 - 63 * 2, -335) #Baltic Avenue
  216. m3.setpos(335 - 82 - 63 * 4, -335) #Reading Railroad
  217. m4.setpos(335 - 82 - 63 * 5, -335) #Oriental Avenue
  218. m5.setpos(335 - 82 - 63 * 7, -335) #Vermont Avenue
  219. m6.setpos(335 - 82 - 63 * 8, -335) #Connecticut Avenue
  220. m7.setpos(-333, -335 + 82 + 63 * 0) #St. Charles Place
  221. m8.setpos(-333, -335 + 82 + 63 * 1) #Electric Company
  222. m9.setpos(-333, -335 + 82 + 63 * 2) #States Avenue
  223. m10.setpos(-333, -335 + 82 + 63 * 3) #Virginia Avenue
  224. m11.setpos(-333, -335 + 82 + 63 * 4) #Pennsylvania Railroad
  225. m12.setpos(-333, -335 + 82 + 63 * 5) #St. James Place
  226. m13.setpos(-333, -335 + 82 + 63 * 7) #Tennessee Avenue
  227. m14.setpos(-333, -335 + 82 + 63 * 8) #New York Avenue
  228. m15.setpos(-333 + 82 + 63 * 0, 333) #Kentucky Avenue
  229. m16.setpos(-333 + 82 + 63 * 2, 333) #Indiana Avenue
  230. m17.setpos(-333 + 82 + 63 * 3, 333) #Illinois Avenue
  231. m18.setpos(-333 + 82 + 63 * 4, 333) #B & O Railroad
  232. m19.setpos(-333 + 82 + 63 * 5, 333) #Atlantic Avenue
  233. m20.setpos(-333 + 82 + 63 * 6, 333) #Ventnor Avenue
  234. m21.setpos(-333 + 82 + 63 * 7, 333) #Water Works
  235. m22.setpos(-333 + 82 + 63 * 8, 333) #Marvin Gardens
  236. m23.setpos(335, 333 - 82 - 63 * 0) #Pacific Avenue
  237. m24.setpos(335, 333 - 82 - 63 * 1) #North Carolina Avenue
  238. m25.setpos(335, 333 - 82 - 63 * 3) #Pennsylvania Avenue
  239. m26.setpos(335, 333 - 82 - 63 * 4) #Short Line
  240. m27.setpos(335, 333 - 82 - 63 * 6) #Park Place
  241. m28.setpos(335, 333 - 82 - 63 * 8) #Boardwalk
  242.  
  243. #Sets up houses and hotels
  244. house = "house.gif"
  245. house2 = "house2.gif"
  246. house3 = "house3.gif"
  247. house4 = "house4.gif"
  248. hotel = "hotel.gif"
  249. wn.addshape(house)
  250. wn.addshape(house2)
  251. wn.addshape(house3)
  252. wn.addshape(house4)
  253. wn.addshape(hotel)
  254. h1 = turtle.Turtle()
  255. h1.shape(house)
  256. h1.pu()
  257. h1.speed(0)
  258. #h1.ht()
  259. h2 = h1.clone()
  260. h3 = h1.clone()
  261. h4 = h1.clone()
  262. h5 = h1.clone()
  263. h6 = h1.clone()
  264. h7 = h1.clone()
  265. h8 = h1.clone()
  266. h9 = h1.clone()
  267. h10 = h1.clone()
  268. h11 = h1.clone()
  269. h12 = h1.clone()
  270. h13 = h1.clone()
  271. h14 = h1.clone()
  272. h15 = h1.clone()
  273. h16 = h1.clone()
  274. h17 = h1.clone()
  275. h18 = h1.clone()
  276. h19 = h1.clone()
  277. h20 = h1.clone()
  278. h21 = h1.clone()
  279. h22 = h1.clone()
  280. h1.setpos(335 - 82 - 63 * 0, -295) #Mediterranean Avenue
  281. h2.setpos(335 - 82 - 63 * 2, -295) #Baltic Avenue
  282. h3.setpos(335 - 82 - 63 * 5, -295) #Oriental Avenue
  283. h4.setpos(335 - 82 - 63 * 7, -295) #Vermont Avenue
  284. h5.setpos(335 - 82 - 63 * 8, -295) #Connecticut Avenue
  285. h6.setpos(-295, -335 + 82 + 63 * 0) #St. Charles Place
  286. h7.setpos(-295, -335 + 82 + 63 * 2) #States Avenue
  287. h8.setpos(-295, -335 + 82 + 63 * 3) #Virginia Avenue
  288. h9.setpos(-295, -335 + 82 + 63 * 5) #St. James Place
  289. h10.setpos(-295, -335 + 82 + 63 * 7) #Tennessee Avenue
  290. h11.setpos(-295, -335 + 82 + 63 * 8) #New York Avenue
  291. h12.setpos(-335 + 82 + 63 * 0, 295) #Kentucky Avenue
  292. h13.setpos(-335 + 82 + 63 * 2, 295) #Indiana Avenue
  293. h14.setpos(-335 + 82 + 63 * 3, 295) #Illinois Avenue
  294. h15.setpos(-335 + 82 + 63 * 5, 295) #Atlantic Avenue
  295. h16.setpos(-335 + 82 + 63 * 6, 295) #Ventnor Avenue
  296. h17.setpos(-335 + 82 + 63 * 8, 295) #Marvin Gardens
  297. h18.setpos(295, 335 - 82 - 63 * 0) #Pacific Avenue
  298. h19.setpos(295, 335 - 82 - 63 * 1) #North Carolina Avenue
  299. h20.setpos(295, 335 - 82 - 63 * 3) #Pennsylvania Avenue
  300. h21.setpos(295, 335 - 82 - 63 * 6) #Park Place
  301. h22.setpos(295, 335 - 82 - 63 * 8) #Boardwalk
  302.  
  303. #Sets up characters
  304. char1 = "cat.gif"
  305. char2 = "stick.gif"
  306. wn.addshape(char1)
  307. wn.addshape(char2)
  308. player2 = turtle.Turtle()
  309. player1 = turtle.Turtle()
  310. player1.ht()
  311. player2.ht()
  312. player1.pu()
  313. player2.pu()
  314. player1.speed(0)
  315. player2.speed(0)
  316. p1x = 335
  317. p1y = -335
  318. p2x = 335
  319. p2y = -335
  320. player1.setpos(p1x, p1y)
  321. player2.setpos(p2x, p2y)
  322. player1.speed(2)
  323. player2.speed(2)
  324.  
  325. #Intro text
  326. print("---------------------------------------------------------")
  327. print("Welcome to Monopoly!")
  328. input()
  329.  
  330. #Defines names
  331. p1 = input("Give us your name, Player One! ")
  332. p2 = input("Don't be shy, introduce yourself, Player Two! ")
  333. print()
  334.  
  335. #Allows players to select characters
  336.  
  337. print("Select your character,", p1 + "!")
  338.  
  339.  
  340. #Sets players to their selected characters
  341. player1.shape(char1)
  342. player2.shape(char2)
  343. player1.st()
  344. player2.st()
  345.  
  346. #Determines who goes first
  347. if turn == 1:
  348. print(p1, "goes first!")
  349. input()
  350. if turn == 2:
  351. print(p2, "goes first!")
  352. input()
  353.  
  354. #While game is on...
  355. while game == 1:
  356. ####While it is Player One's turn...
  357. while turn == 1:
  358. #Displays player stats
  359. print("***************")
  360. print(p1 + ":\t$" + str(p1m))
  361. print(p2 + ":\t$" + str(p2m) + "\n***************\n")
  362.  
  363. #If player is in Jail...
  364. if p1j == 1:
  365. p1jc = "x"
  366. p1jt = p1jt + 1
  367. #Player has these Jail options...
  368. while p1jc != "p" and p1jc != "r":
  369. if p1jt < 4:
  370. print("You are in Jail.")
  371. print("I. Pay $50 to be released (p)")
  372. print("II. Attempt to roll doubles (r)")
  373. p1jc = input()
  374. #If player pays to leave Jail...
  375. if p1jc == "p":
  376. if p1m >= 50:
  377. print(p1, "paid and left Jail.")
  378. p1j = 0
  379. p1jt = 0
  380. p1m = p1m - 50
  381. else:
  382. print("Insufficient funds. Too bad.\n")
  383. p1jc = "x"
  384. #If player rolls to leave Jail...
  385. elif p1jc == "r":
  386. die1 = random.randint(1, 6)
  387. die2 = random.randint(1, 6)
  388. input("Here's hoping to some good luck...\n")
  389. print(p1, "rolled a", str(die1), "and a", str(die2) + "!\n")
  390.  
  391. if die1 == die2:
  392. print("Success! You walked free.")
  393. p1j = 0
  394. p1jt = 0
  395. else:
  396. print("Ah, you tried.")
  397. #turn = 2
  398. else:
  399. print("Invalid response.")
  400. else:
  401. print("You served your time,", p1 + ".")
  402. input()
  403. p1j = 0
  404. p1jt = 0
  405. p1jc = "r"
  406. if turn == 1:
  407. p1c = "x"
  408. #Player menu
  409. while p1c != "r" and p1c != "m" and p1c != "b" and p1c != "t" and p1c != "u" and p1c != "s" and p1c != "d":
  410. print("What will you do?")
  411. print("I. Roll the dice (r)")
  412. print("II. Mortgage properties (m)")
  413. print("III. Unmortgage properties (u)")
  414. print("III. Build houses (b)")
  415. print("IV. Sell houses (s)")
  416. print("V. Make a trade (t)")
  417. print("VI. Declare bankruptcy (d)")
  418. p1c = input()
  419. #If player chooses to roll...
  420. if p1c == "r":
  421. print("\nRoll the dice,", p1 + "!")
  422. input()
  423. #If player chooses to mortgage...
  424. elif p1c == "m":
  425. p1mc = "x"
  426. #Huge friggin' mortgaging while loop
  427. while p1mc != "Mediterranean Avenue" and p1mc != "Baltic Avenue" and p1mc != "Reading Railroad" and p1mc != "Oriental Avenue" and p1mc != "Vermont Avenue" and p1mc != "Connecticut Avenue" and p1mc != "St. Charles Place" and p1mc != "Electric Company" and p1mc != "States Avenue" and p1mc != "Virginia Avenue" and p1mc != "Pennsylvania Railroad" and p1mc != "St. James Place" and p1mc != "Tennessee Avenue" and p1mc != "New York Avenue" and p1mc != "Kentucky Avenue" and p1mc != "Indiana Avenue" and p1mc != "Illinois Avenue" and p1mc != "B & O Railroad" and p1mc != "Atlantic Avenue" and p1mc != "Ventnor Avenue" and p1mc != "Water Works" and p1mc != "Marvin Gardens" and p1mc != "Pacific Avenue" and p1mc != "North Carolina Avenue" and p1mc != "Pennsylvania Avenue" and p1mc != "Short Line" and p1mc != "Park Place" and p1mc != "Boardwalk" and p1mc != "Done":
  428. print("Mortgage which properties?")
  429. print("``````````````````````````")
  430. if br1 == 1 and br1m == 0 and br1h == 0 and br2h == 0:
  431. print("Mediterranean Avenue ($30)")
  432. if br2 == 1 and br2m == 0 and br1h == 0 and br2h == 0:
  433. print("Baltic Avenue ($30)")
  434. if cy1 == 1 and cy1m == 0 and cy1h == 0 and cy2h == 0 and cy3h == 0:
  435. print("Oriental Avenue ($50)")
  436. if cy2 == 1 and cy2m == 0 and cy1h == 0 and cy2h == 0 and cy3h == 0:
  437. print("Vermont Avenue ($50)")
  438. if cy3 == 1 and cy3m == 0 and cy1h == 0 and cy2h == 0 and cy3h == 0:
  439. print("Connecticut Avenue ($60)")
  440. if vi1 == 1 and vi1m == 0 and vi1h == 0 and vi2h == 0 and vi3h == 0:
  441. print("St. Charles Place ($70)")
  442. if vi2 == 1 and vi2m == 0 and vi1h == 0 and vi2h == 0 and vi3h == 0:
  443. print("States Avenue ($70)")
  444. if vi3 == 1 and vi3m == 0 and vi1h == 0 and vi2h == 0 and vi3h == 0:
  445. print("Virginia Avenue ($80)")
  446. if or1 == 1 and or1m == 0 and or1h == 0 and or2h == 0 and or3h == 0:
  447. print("St. James Place ($90)")
  448. if or2 == 1 and or2m == 0 and or1h == 0 and or2h == 0 and or3h == 0:
  449. print("Tennessee Avenue ($90)")
  450. if or3 == 1 and or3m == 0 and or1h == 0 and or2h == 0 and or3h == 0:
  451. print("New York Avenue ($100)")
  452. if red1 == 1 and red1m == 0 and red1h == 0 and red2h == 0 and red3h == 0:
  453. print("Kentucky Avenue ($110)")
  454. if red2 == 1 and red2m == 0 and red1h == 0 and red2h == 0 and red3h == 0:
  455. print("Indiana Avenue ($110)")
  456. if red3 == 1 and red3m == 0 and red1h == 0 and red2h == 0 and red3h == 0:
  457. print("Illinois Avenue ($120)")
  458. if ye1 == 1 and ye1m == 0 and ye1h == 0 and ye2h == 0 and ye3h == 0:
  459. print("Atlantic Avenue ($130)")
  460. if ye2 == 1 and ye2m == 0 and ye1h == 0 and ye2h == 0 and ye3h == 0:
  461. print("Ventnor Avenue ($130)")
  462. if ye3 == 1 and ye3m == 0 and ye1h == 0 and ye2h == 0 and ye3h == 0:
  463. print("Marvin Gardens ($140)")
  464. if gr1 == 1 and gr1m == 0 and gr1h == 0 and gr2h == 0 and gr3h == 0:
  465. print("Pacific Avenue ($150)")
  466. if gr2 == 1 and gr2m == 0 and gr1h == 0 and gr2h == 0 and gr3h == 0:
  467. print("North Carolina Avenue ($150)")
  468. if gr3 == 1 and gr3m == 0 and gr1h == 0 and gr2h == 0 and gr3h == 0:
  469. print("Pennsylvania Avenue ($160)")
  470. if bl1 == 1 and bl1m == 0 and bl1h == 0 and bl2h == 0:
  471. print("Park Place ($175)")
  472. if bl2 == 1 and bl2m == 0 and bl1h == 0 and bl2h == 0:
  473. print("Boardwalk ($200)")
  474. if rrr == 1 and rrrm == 0:
  475. print("Reading Railroad ($100)")
  476. if prr == 1 and prrm == 0:
  477. print("Pennsylvania Railroad ($100)")
  478. if brr == 1 and brrm == 0:
  479. print("B & O Railroad ($100)")
  480. if srr == 1 and srrm == 0:
  481. print("Short Line ($100)")
  482. if ec == 1 and ecm == 0:
  483. print("Electric Company ($75)")
  484. if ww == 1 and wwm == 0:
  485. print("Water Works ($75)")
  486. print("``````````````````````````")
  487. print("(Type 'Done' to finish)")
  488. p1mc = input()
  489. print()
  490. #If player tries to mortgage Mediterranean Avenue...
  491. if p1mc == "Mediterranean Avenue":
  492. if br1 == 1 and br1m == 0 and br1h == 0 and br2h == 0:
  493. print(p1, "mortgaged Mediterranean Avenue for $30.")
  494. br1m = 1
  495. p1m = p1m + 30
  496. m1.st()
  497. else:
  498. print("Unable to mortgage that property.")
  499. p1mc = "x"
  500. #If player tries to mortgage Baltic Avenue...
  501. elif p1mc == "Baltic Avenue":
  502. if br2 == 1 and br2m == 0 and br1h == 0 and br2h == 0:
  503. print(p1, "mortgaged Baltic Avenue for $30.")
  504. br2m = 1
  505. p1m = p1m + 30
  506. m2.st()
  507. else:
  508. print("Unable to mortgage that property.")
  509. p1mc = "x"
  510. #If player tries to mortgage Oriental Avenue...
  511. elif p1mc == "Oriental Avenue":
  512. if cy1 == 1 and cy1m == 0 and cy1h == 0 and cy2h == 0 and cy3h == 0:
  513. print(p1, "mortgaged Oriental Avenue for $50.")
  514. cy1m = 1
  515. p1m = p1m + 50
  516. m4.st()
  517. else:
  518. print("Unable to mortgage that property.")
  519. p1mc = "x"
  520. #If player tries to mortgage Vermont Avenue...
  521. elif p1mc == "Vermont Avenue":
  522. if cy2 == 1 and cy2m == 0 and cy1h == 0 and cy2h == 0 and cy3h == 0:
  523. print(p1, "mortgaged Vermont Avenue for $50.")
  524. cy2m = 1
  525. p1m = p1m + 50
  526. m5.st()
  527. else:
  528. print("Unable to mortgage that property.")
  529. p1mc = "x"
  530. #If player tries to mortgage Connecticut Avenue...
  531. elif p1mc == "Connecticut Avenue":
  532. if cy3 == 1 and cy3m == 0 and cy1h == 0 and cy2h == 0 and cy3h == 0:
  533. print(p1, "mortgaged Connecticut Avenue for $60.")
  534. cy3m = 1
  535. p1m = p1m + 60
  536. m6.st()
  537. else:
  538. print("Unable to mortgage that property.")
  539. p1mc = "x"
  540. #If player tries to mortgage St. Charles Place...
  541. elif p1mc == "St. Charles Place":
  542. if vi1 == 1 and vi1m == 0 and vi1h == 0 and vi2h == 0 and vi3h == 0:
  543. print(p1, "mortgaged St. Charles Place for $70.")
  544. vi1m = 1
  545. p1m = p1m + 70
  546. m7.st()
  547. else:
  548. print("Unable to mortgage that property.")
  549. p1mc = "x"
  550. #If player tries to mortgage States Avenue...
  551. elif p1mc == "States Avenue":
  552. if vi2 == 1 and vi2m == 0 and vi1h == 0 and vi2h == 0 and vi3h == 0:
  553. print(p1, "mortgaged States Avenue for $70.")
  554. vi2m = 1
  555. p1m = p1m + 70
  556. m9.st()
  557. else:
  558. print("Unable to mortgage that property.")
  559. p1mc = "x"
  560. #If player tries to mortgage Virginia Avenue...
  561. elif p1mc == "Virginia Avenue":
  562. if vi3 == 1 and vi3m == 0 and vi1h == 0 and vi2h == 0 and vi3h == 0:
  563. print(p1, "mortgaged Virginia Avenue for $80.")
  564. vi3m = 1
  565. p1m = p1m + 80
  566. m10.st()
  567. else:
  568. print("Unable to mortgage that property.")
  569. p1mc = "x"
  570. #If player tries to mortgage St. James Place...
  571. elif p1mc == "St. James Place":
  572. if or1 == 1 and or1m == 0 and or1h == 0 and or2h == 0 and or3h == 0:
  573. print(p1, "mortgaged St. James Place for $90.")
  574. or1m = 1
  575. p1m = p1m + 90
  576. m12.st()
  577. else:
  578. print("Unable to mortgage that property.")
  579. p1mc = "x"
  580. #If player tries to mortgage Tennessee Avenue...
  581. elif p1mc == "Tennessee Avenue":
  582. if or2 == 1 and or2m == 0 and or1h == 0 and or2h == 0 and or3h == 0:
  583. print(p1, "mortgaged Tennessee Avenue for $90.")
  584. or2m = 1
  585. p1m = p1m + 90
  586. m13.st()
  587. else:
  588. print("Unable to mortgage that property.")
  589. p1mc = "x"
  590. #If player tries to mortgage New York Avenue...
  591. elif p1mc == "New York Avenue":
  592. if or3 == 1 and or3m == 0 and or1h == 0 and or2h == 0 and or3h == 0:
  593. print(p1, "mortgaged New York Avenue for $100.")
  594. or3m = 1
  595. p1m = p1m + 100
  596. m14.st()
  597. else:
  598. print("Unable to mortgage that property.")
  599. p1mc = "x"
  600. #If player tries to mortgage Kentucky Avenue...
  601. elif p1mc == "Kentucky Avenue":
  602. if red1 == 1 and red1m == 0 and red1h == 0 and red2h == 0 and red3h == 0:
  603. print(p1, "mortgaged Kentucky Avenue for $110.")
  604. red1m = 1
  605. p1m = p1m + 110
  606. m15.st()
  607. else:
  608. print("Unable to mortgage that property.")
  609. p1mc = "x"
  610. #If player tries to mortgage Indiana Avenue...
  611. elif p1mc == "Indiana Avenue":
  612. if red2 == 1 and red2m == 0 and red1h == 0 and red2h == 0 and red3h == 0:
  613. print(p1, "mortgaged Indiana Avenue for $110.")
  614. red2m = 1
  615. p1m = p1m + 110
  616. m16.st()
  617. else:
  618. print("Unable to mortgage that property.")
  619. p1mc = "x"
  620. #If player tries to mortgage Illinois Avenue...
  621. elif p1mc == "Illinois Avenue":
  622. if red3 == 1 and red3m == 0 and red1h == 0 and red2h == 0 and red3h == 0:
  623. print(p1, "mortgaged Illinois Avenue for $120.")
  624. red3m = 1
  625. p1m = p1m + 120
  626. m17.st()
  627. else:
  628. print("Unable to mortgage that property.")
  629. p1mc = "x"
  630. #If player tries to mortgage Atlantic Avenue...
  631. elif p1mc == "Atlantic Avenue":
  632. if ye1 == 1 and ye1m == 0 and ye1h == 0 and ye2h == 0 and ye3h == 0:
  633. print(p1, "mortgaged Atlantic Avenue for $130.")
  634. ye1m = 1
  635. p1m = p1m + 130
  636. m19.st()
  637. else:
  638. print("Unable to mortgage that property.")
  639. p1mc = "x"
  640. #If player tries to mortgage Ventnor Avenue...
  641. elif p1mc == "Ventnor Avenue":
  642. if ye2 == 1 and ye2m == 0 and ye1h == 0 and ye2h == 0 and ye3h == 0:
  643. print(p1, "mortgaged Ventnor Avenue for 130.")
  644. ye2m = 1
  645. p1m = p1m + 130
  646. m20.st()
  647. else:
  648. print("Unable to mortgage that property.")
  649. p1mc = "x"
  650. #If player tries to mortgage Marvin Gardens...
  651. elif p1mc == "Marvin Gardens":
  652. if ye3 == 1 and ye3m == 0 and ye1h == 0 and ye2h == 0 and ye3h == 0:
  653. print(p1, "mortgaged Marvin Gardens for $140.")
  654. ye3m = 1
  655. p1m = p1m + 140
  656. m22.st()
  657. else:
  658. print("Unable to mortgage that property.")
  659. p1mc = "x"
  660. #If player tries to mortgage Pacific Avenue...
  661. elif p1mc == "Pacific Avenue":
  662. if gr1 == 1 and gr1m == 0 and gr1h == 0 and gr2h == 0 and gr3h == 0:
  663. print(p1, "mortgaged Pacific Avenue for $150.")
  664. gr1m = 1
  665. p1m = p1m + 150
  666. m23.st()
  667. else:
  668. print("Unable to mortgage that property.")
  669. p1mc = "x"
  670. #If player tries to mortgage North Carolina Avenue...
  671. elif p1mc == "North Carolina Avenue":
  672. if gr2 == 1 and gr2m == 0 and gr1h == 0 and gr2h == 0 and gr3h == 0:
  673. print(p1, "mortgaged North Carolina Avenue for $150.")
  674. gr2m = 1
  675. p1m = p1m + 150
  676. m24.st()
  677. else:
  678. print("Unable to mortgage that property.")
  679. p1mc = "x"
  680. #If player tries to mortgage Pennsylvania Avenue...
  681. elif p1mc == "Pennsylvania Avenue":
  682. if gr3 == 1 and gr3m == 0 and gr1h == 0 and gr2h == 0 and gr3h == 0:
  683. print(p1, "mortgaged Pennsylvania Avenue for $160.")
  684. gr3m = 1
  685. p1m = p1m + 160
  686. m25.st()
  687. else:
  688. print("Unable to mortgage that property.")
  689. p1mc = "x"
  690. #If player tries to mortgage Park Place...
  691. elif p1mc == "Park Place":
  692. if bl1 == 1 and bl1m == 0 and bl1h == 0 and bl2h == 0:
  693. print(p1, "mortgaged Park Place for $175.")
  694. bl1m = 1
  695. p1m = p1m + 175
  696. m27.st()
  697. else:
  698. print("Unable to mortgage that property.")
  699. p1mc = "x"
  700. #If player tries to mortgage Boardwalk...
  701. elif p1mc == "Boardwalk":
  702. if bl2 == 1 and bl2m == 0 and bl1h == 0 and bl2h == 0:
  703. print(p1, "mortgaged Boardwalk for $200.")
  704. bl2m = 1
  705. p1m = p1m + 200
  706. m28.st()
  707. else:
  708. print("Unable to mortgage that property.")
  709. p1mc = "x"
  710. #If player tries to mortgage Reading Railroad...
  711. elif p1mc == "Reading Railroad":
  712. if rrr == 1 and rrrm == 0:
  713. print(p1, "mortgaged Reading Railroad for $100.")
  714. rrrm = 1
  715. p1rr = p1rr - 1
  716. p1m = p1m + 100
  717. m3.st()
  718. else:
  719. print("Unable to mortgage that property.")
  720. p1mc = "x"
  721. #If player tries to mortgage Pennsylvania Railroad...
  722. elif p1mc == "Pennsylvania Railroad":
  723. if prr == 1 and prrm == 0:
  724. print(p1, "mortgaged Pennsylvania Railroad for $100.")
  725. prrm = 1
  726. p1rr = p1rr - 1
  727. p1m = p1m + 100
  728. m11.st()
  729. else:
  730. print("Unable to mortgage that property.")
  731. p1mc = "x"
  732. #If player tries to mortgage B & O Railroad...
  733. elif p1mc == "B & O Railroad":
  734. if brr == 1 and brrm == 0:
  735. print(p1, "mortgaged B & O Railroad for $100.")
  736. brrm = 1
  737. p1rr = p1rr - 1
  738. p1m = p1m + 100
  739. m18.st()
  740. else:
  741. print("Unable to mortgage that property.")
  742. p1mc = "x"
  743. #If player tries to mortgage Short Line...
  744. elif p1mc == "Short Line":
  745. if srr == 1 and srrm == 0:
  746. print(p1, "mortgaged Short Line for $100.")
  747. srrm = 1
  748. p1rr = p1rr - 1
  749. p1m = p1m + 100
  750. m26.st()
  751. else:
  752. print("Unable to mortgage that property.")
  753. p1mc = "x"
  754. #If player tries to mortgage Electric Company...
  755. elif p1mc == "Electric Company":
  756. if ec == 1 and ecm == 0:
  757. print(p1, "mortgaged Electric Company for $75.")
  758. ecm = 1
  759. p1u = p1u - 1
  760. p1m = p1m + 75
  761. m8.st()
  762. else:
  763. print("Unable to mortgage that property.")
  764. p1mc = "x"
  765. #If player tries to mortgage Water Works...
  766. elif p1mc == "Water Works":
  767. if ww == 1 and wwm == 0:
  768. print(p1, "mortgaged Water Works for $75.")
  769. wwm = 1
  770. p1u = p1u - 1
  771. p1m = p1m + 75
  772. m21.st()
  773. else:
  774. print("Unable to mortgage that property.")
  775. p1mc = "x"
  776.  
  777. #If player is done mortgaging properties...
  778. elif p1mc == "Done":
  779. print("Now then...")
  780. #If player enters an invalid response...
  781. else:
  782. print("Invalid response.")
  783. p1c = "x"
  784. print()
  785. #If player chooses to unmortgage...
  786. elif p1c == "u":
  787. p1mc = "x"
  788. #Huge friggin' unmortgaging while loop
  789. while p1mc != "Mediterranean Avenue" and p1mc != "Baltic Avenue" and p1mc != "Reading Railroad" and p1mc != "Oriental Avenue" and p1mc != "Vermont Avenue" and p1mc != "Connecticut Avenue" and p1mc != "St. Charles Place" and p1mc != "Electric Company" and p1mc != "States Avenue" and p1mc != "Virginia Avenue" and p1mc != "Pennsylvania Railroad" and p1mc != "St. James Place" and p1mc != "Tennessee Avenue" and p1mc != "New York Avenue" and p1mc != "Kentucky Avenue" and p1mc != "Indiana Avenue" and p1mc != "Illinois Avenue" and p1mc != "B & O Railroad" and p1mc != "Atlantic Avenue" and p1mc != "Ventnor Avenue" and p1mc != "Water Works" and p1mc != "Marvin Gardens" and p1mc != "Pacific Avenue" and p1mc != "North Carolina Avenue" and p1mc != "Pennsylvania Avenue" and p1mc != "Short Line" and p1mc != "Park Place" and p1mc != "Boardwalk" and p1mc != "Done":
  790. print("Unmortgage which properties?")
  791. print("``````````````````````````")
  792. if br1 == 1 and br1m == 1:
  793. print("Mediterranean Avenue (-$33)")
  794. if br2 == 1 and br2m == 1:
  795. print("Baltic Avenue (-$33)")
  796. if cy1 == 1 and cy1m == 1:
  797. print("Oriental Avenue (-$55)")
  798. if cy2 == 1 and cy2m == 1:
  799. print("Vermont Avenue (-$55)")
  800. if cy3 == 1 and cy3m == 1:
  801. print("Connecticut Avenue (-$66)")
  802. if vi1 == 1 and vi1m == 1:
  803. print("St. Charles Place (-$77)")
  804. if vi2 == 1 and vi2m == 1:
  805. print("States Avenue (-$77)")
  806. if vi3 == 1 and vi3m == 1:
  807. print("Virginia Avenue (-$88)")
  808. if or1 == 1 and or1m == 1:
  809. print("St. James Place (-$99)")
  810. if or2 == 1 and or2m == 1:
  811. print("Tennessee Avenue (-$99)")
  812. if or3 == 1 and or3m == 1:
  813. print("New York Avenue (-$110)")
  814. if red1 == 1 and red1m == 1:
  815. print("Kentucky Avenue (-$121)")
  816. if red2 == 1 and red2m == 1:
  817. print("Indiana Avenue (-$121)")
  818. if red3 == 1 and red3m == 1:
  819. print("Illinois Avenue (-$132)")
  820. if ye1 == 1 and ye1m == 1:
  821. print("Atlantic Avenue (-$143)")
  822. if ye2 == 1 and ye2m == 1:
  823. print("Ventnor Avenue (-$143)")
  824. if ye3 == 1 and ye3m == 1:
  825. print("Marvin Gardens (-$154)")
  826. if gr1 == 1 and gr1m == 1:
  827. print("Pacific Avenue (-$165)")
  828. if gr2 == 1 and gr2m == 1:
  829. print("North Carolina Avenue (-$165)")
  830. if gr3 == 1 and gr3m == 1:
  831. print("Pennsylvania Avenue (-$176)")
  832. if bl1 == 1 and bl1m == 1:
  833. print("Park Place (-$192)")
  834. if bl2 == 1 and bl2m == 1:
  835. print("Boardwalk (-$220)")
  836. if rrr == 1 and rrrm == 1:
  837. print("Reading Railroad (-$110)")
  838. if prr == 1 and prrm == 1:
  839. print("Pennsylvania Railroad (-$110)")
  840. if brr == 1 and brrm == 1:
  841. print("B & O Railroad (-$110)")
  842. if srr == 1 and srrm == 1:
  843. print("Short Line (-$110)")
  844. if ec == 1 and ecm == 1:
  845. print("Electric Company (-$82)")
  846. if ww == 1 and wwm == 1:
  847. print("Water Works (-$82)")
  848. print("``````````````````````````")
  849. print("(Type 'Done' to finish)")
  850. p1mc = input()
  851. print()
  852. #If player tries to unmortgage Mediterranean Avenue...
  853. if p1mc == "Mediterranean Avenue":
  854. if br1 == 1 and br1m == 1 and p1m >= 33:
  855. print(p1, "unmortgaged Mediterranean Avenue for $33.")
  856. br1m = 0
  857. p1m = p1m - 33
  858. m1.ht()
  859. else:
  860. print("Unable to unmortgage that property.")
  861. p1mc = "x"
  862. #If player tries to unmortgage Baltic Avenue...
  863. elif p1mc == "Baltic Avenue":
  864. if br2 == 1 and br2m == 1 and p1m >= 33:
  865. print(p1, "unmortgaged Baltic Avenue for $33.")
  866. br2m = 0
  867. p1m = p1m - 33
  868. m2.ht()
  869. else:
  870. print("Unable to unmortgage that property.")
  871. p1mc = "x"
  872. #If player tries to unmortgage Oriental Avenue...
  873. elif p1mc == "Oriental Avenue":
  874. if cy1 == 1 and cy1m == 1 and p1m >= 55:
  875. print(p1, "unmortgaged Oriental Avenue for $55.")
  876. cy1m = 0
  877. p1m = p1m - 55
  878. m4.ht()
  879. else:
  880. print("Unable to unmortgage that property.")
  881. p1mc = "x"
  882. #If player tries to unmortgage Vermont Avenue...
  883. elif p1mc == "Vermont Avenue":
  884. if cy2 == 1 and cy2m == 1 and p1m >= 55:
  885. print(p1, "unmortgaged Vermont Avenue for $55.")
  886. cy2m = 0
  887. p1m = p1m - 55
  888. m5.ht()
  889. else:
  890. print("Unable to unmortgage that property.")
  891. p1mc = "x"
  892. #If player tries to unmortgage Connecticut Avenue...
  893. elif p1mc == "Connecticut Avenue":
  894. if cy3 == 1 and cy3m == 1 and p1m >= 66:
  895. print(p1, "unmortgaged Connecticut Avenue for $66.")
  896. cy3m = 0
  897. p1m = p1m - 66
  898. m6.ht()
  899. else:
  900. print("Unable to unmortgage that property.")
  901. p1mc = "x"
  902. #If player tries to unmortgage St. Charles Place...
  903. elif p1mc == "St. Charles Place":
  904. if vi1 == 1 and vi1m == 1 and p1m >= 77:
  905. print(p1, "unmortgaged St. Charles Place for $77.")
  906. vi1m = 0
  907. p1m = p1m - 77
  908. m7.ht()
  909. else:
  910. print("Unable to unmortgage that property.")
  911. p1mc = "x"
  912. #If player tries to unmortgage States Avenue...
  913. elif p1mc == "States Avenue":
  914. if vi2 == 1 and vi2m == 1 and p1m >= 77:
  915. print(p1, "unmortgaged States Avenue for $77.")
  916. vi2m = 0
  917. p1m = p1m - 77
  918. m9.ht()
  919. else:
  920. print("Unable to unmortgage that property.")
  921. p1mc = "x"
  922. #If player tries to unmortgage Virginia Avenue...
  923. elif p1mc == "Virginia Avenue":
  924. if vi3 == 1 and vi3m == 1 and p1m >= 88:
  925. print(p1, "unmortgaged Virginia Avenue for $88.")
  926. vi3m = 0
  927. p1m = p1m - 88
  928. m10.ht()
  929. else:
  930. print("Unable to unmortgage that property.")
  931. p1mc = "x"
  932. #If player tries to unmortgage St. James Place...
  933. elif p1mc == "St. James Place":
  934. if or1 == 1 and or1m == 1 and p1m >= 99:
  935. print(p1, "unmortgaged St. James Place for $99.")
  936. or1m = 0
  937. p1m = p1m - 99
  938. m12.ht()
  939. else:
  940. print("Unable to unmortgage that property.")
  941. p1mc = "x"
  942. #If player tries to unmortgage Tennessee Avenue...
  943. elif p1mc == "Tennessee Avenue":
  944. if or2 == 1 and or2m == 1 and p1m >= 99:
  945. print(p1, "unmortgaged Tennessee Avenue for $99.")
  946. or2m = 0
  947. p1m = p1m - 99
  948. m13.ht()
  949. else:
  950. print("Unable to unmortgage that property.")
  951. p1mc = "x"
  952. #If player tries to unmortgage New York Avenue...
  953. elif p1mc == "New York Avenue":
  954. if or3 == 1 and or3m == 1 and p1m >= 110:
  955. print(p1, "unmortgaged New York Avenue for $110.")
  956. or3m = 0
  957. p1m = p1m - 110
  958. m14.ht()
  959. else:
  960. print("Unable to unmortgage that property.")
  961. p1mc = "x"
  962. #If player tries to unmortgage Kentucky Avenue...
  963. elif p1mc == "Kentucky Avenue":
  964. if red1 == 1 and red1m == 1 and p1m >= 121:
  965. print(p1, "unmortgaged Kentucky Avenue for $121.")
  966. red1m = 0
  967. p1m = p1m - 121
  968. m15.ht()
  969. else:
  970. print("Unable to unmortgage that property.")
  971. p1mc = "x"
  972. #If player tries to unmortgage Indiana Avenue...
  973. elif p1mc == "Indiana Avenue":
  974. if red2 == 1 and red2m == 1 and p1m >= 121:
  975. print(p1, "unmortgaged Indiana Avenue for $121.")
  976. red2m = 0
  977. p1m = p1m - 121
  978. m16.ht()
  979. else:
  980. print("Unable to unmortgage that property.")
  981. p1mc = "x"
  982. #If player tries to unmortgage Illinois Avenue...
  983. elif p1mc == "Illinois Avenue":
  984. if red3 == 1 and red3m == 1 and p1m >= 132:
  985. print(p1, "unmortgaged Illinois Avenue for $132.")
  986. red3m = 0
  987. p1m = p1m - 132
  988. m17.ht()
  989. else:
  990. print("Unable to unmortgage that property.")
  991. p1mc = "x"
  992. #If player tries to unmortgage Atlantic Avenue...
  993. elif p1mc == "Atlantic Avenue":
  994. if ye1 == 1 and ye1m == 1 and p1m >= 143:
  995. print(p1, "unmortgaged Atlantic Avenue for $143.")
  996. ye1m = 0
  997. p1m = p1m - 143
  998. m19.ht()
  999. else:
  1000. print("Unable to unmortgage that property.")
  1001. p1mc = "x"
  1002. #If player tries to unmortgage Ventnor Avenue...
  1003. elif p1mc == "Ventnor Avenue":
  1004. if ye2 == 1 and ye2m == 1 and p1m >= 143:
  1005. print(p1, "unmortgaged Ventnor Avenue for 143.")
  1006. ye2m = 0
  1007. p1m = p1m - 143
  1008. m20.ht()
  1009. else:
  1010. print("Unable to unmortgage that property.")
  1011. p1mc = "x"
  1012. #If player tries to unmortgage Marvin Gardens...
  1013. elif p1mc == "Marvin Gardens":
  1014. if ye3 == 1 and ye3m == 1 and p1m >= 154:
  1015. print(p1, "unmortgaged Marvin Gardens for $154.")
  1016. ye3m = 0
  1017. p1m = p1m - 154
  1018. m22.ht()
  1019. else:
  1020. print("Unable to unmortgage that property.")
  1021. p1mc = "x"
  1022. #If player tries to unmortgage Pacific Avenue...
  1023. elif p1mc == "Pacific Avenue":
  1024. if gr1 == 1 and gr1m == 1 and p1m >= 165:
  1025. print(p1, "unmortgaged Pacific Avenue for $165.")
  1026. gr1m = 0
  1027. p1m = p1m - 165
  1028. m23.ht()
  1029. else:
  1030. print("Unable to unmortgage that property.")
  1031. p1mc = "x"
  1032. #If player tries to unmortgage North Carolina Avenue...
  1033. elif p1mc == "North Carolina Avenue":
  1034. if gr2 == 1 and gr2m == 1 and p1m >= 165:
  1035. print(p1, "unmortgaged North Carolina Avenue for $165.")
  1036. gr2m = 0
  1037. p1m = p1m - 165
  1038. m24.ht()
  1039. else:
  1040. print("Unable to unmortgage that property.")
  1041. p1mc = "x"
  1042. #If player tries to unmortgage Pennsylvania Avenue...
  1043. elif p1mc == "Pennsylvania Avenue":
  1044. if gr3 == 1 and gr3m == 1 and p1m >= 176:
  1045. print(p1, "unmortgaged Pennsylvania Avenue for $176.")
  1046. gr3m = 0
  1047. p1m = p1m - 176
  1048. m25.ht()
  1049. else:
  1050. print("Unable to unmortgage that property.")
  1051. p1mc = "x"
  1052. #If player tries to unmortgage Park Place...
  1053. elif p1mc == "Park Place":
  1054. if bl1 == 1 and bl1m == 1 and p1m >= 192:
  1055. print(p1, "unmortgaged Park Place for $192.")
  1056. bl1m = 0
  1057. p1m = p1m - 192
  1058. m27.ht()
  1059. else:
  1060. print("Unable to unmortgage that property.")
  1061. p1mc = "x"
  1062. #If player tries to unmortgage Boardwalk...
  1063. elif p1mc == "Boardwalk":
  1064. if bl2 == 1 and bl2m == 1 and p1m >= 220:
  1065. print(p1, "unmortgaged Boardwalk for $220.")
  1066. bl2m = 0
  1067. p1m = p1m - 220
  1068. m28.ht()
  1069. else:
  1070. print("Unable to unmortgage that property.")
  1071. p1mc = "x"
  1072. #If player tries to unmortgage Reading Railroad...
  1073. elif p1mc == "Reading Railroad":
  1074. if rrr == 1 and rrrm == 1 and p1m >= 110:
  1075. print(p1, "unmortgaged Reading Railroad for $110.")
  1076. rrrm = 0
  1077. p1rr = p1rr + 1
  1078. p1m = p1m - 110
  1079. m3.ht()
  1080. else:
  1081. print("Unable to unmortgage that property.")
  1082. p1mc = "x"
  1083. #If player tries to unmortgage Pennsylvania Railroad...
  1084. elif p1mc == "Pennsylvania Railroad":
  1085. if prr == 1 and prrm == 1 and p1m >= 110:
  1086. print(p1, "unmortgaged Pennsylvania Railroad for $110.")
  1087. prrm = 0
  1088. p1rr = p1rr + 1
  1089. p1m = p1m - 110
  1090. m11.ht()
  1091. else:
  1092. print("Unable to unmortgage that property.")
  1093. p1mc = "x"
  1094. #If player tries to unmortgage B & O Railroad...
  1095. elif p1mc == "B & O Railroad":
  1096. if brr == 1 and brrm == 1 and p1m >= 110:
  1097. print(p1, "unmortgaged B & O Railroad for $110.")
  1098. brrm = 0
  1099. p1rr = p1rr + 1
  1100. p1m = p1m - 110
  1101. m18.ht()
  1102. else:
  1103. print("Unable to unmortgage that property.")
  1104. p1mc = "x"
  1105. #If player tries to unmortgage Short Line...
  1106. elif p1mc == "Short Line":
  1107. if srr == 1 and srrm == 1 and p1m >= 110:
  1108. print(p1, "unmortgaged Short Line for $110.")
  1109. srrm = 0
  1110. p1rr = p1rr + 1
  1111. p1m = p1m - 110
  1112. m26.ht()
  1113. else:
  1114. print("Unable to unmortgage that property.")
  1115. p1mc = "x"
  1116. #If player tries to unmortgage Electric Company...
  1117. elif p1mc == "Electric Company":
  1118. if ec == 1 and ecm == 1 and p1m >= 82:
  1119. print(p1, "unmortgaged Electric Company for $82.")
  1120. ecm = 0
  1121. p1u = p1u + 1
  1122. p1m = p1m - 82
  1123. m8.ht()
  1124. else:
  1125. print("Unable to unmortgage that property.")
  1126. p1mc = "x"
  1127. #If player tries to unmortgage Water Works...
  1128. elif p1mc == "Water Works":
  1129. if ww == 1 and wwm == 1 and p1m >= 82:
  1130. print(p1, "unmortgaged Water Works for $82.")
  1131. wwm = 0
  1132. p1u = p1u + 1
  1133. p1m = p1m - 82
  1134. m21.ht()
  1135. else:
  1136. print("Unable to unmortgage that property.")
  1137. p1mc = "x"
  1138.  
  1139. #If player is done mortgaging properties...
  1140. elif p1mc == "Done":
  1141. print("Now then...")
  1142. #If player enters an invalid response...
  1143. else:
  1144. print("Invalid response.")
  1145. p1c = "x"
  1146. print()
  1147.  
  1148. #If player chooses to build houses...
  1149. elif p1c == "b":
  1150. p1hc = "x"
  1151. #Huge friggin' house-building while loop
  1152. while p1hc != "Mediterranean Avenue" and p1mc != "Baltic Avenue" and p1mc != "Oriental Avenue" and p1mc != "Vermont Avenue" and p1mc != "Connecticut Avenue" and p1mc != "St. Charles Place" and p1mc != "States Avenue" and p1mc != "Virginia Avenue" and p1mc != "St. James Place" and p1mc != "Tennessee Avenue" and p1mc != "New York Avenue" and p1mc != "Kentucky Avenue" and p1mc != "Indiana Avenue" and p1mc != "Illinois Avenue" and p1mc != "Atlantic Avenue" and p1mc != "Ventnor Avenue" and p1mc != "Marvin Gardens" and p1mc != "Pacific Avenue" and p1mc != "North Carolina Avenue" and p1mc != "Pennsylvania Avenue" and p1mc != "Park Place" and p1mc != "Boardwalk" and p1mc != "Done":
  1153. print("Build house on which property?")
  1154. print("``````````````````````````")
  1155. if p1m >= 50:
  1156. if br1 == 1 and br2 == 1 and br1m == 0 and br2m == 0:
  1157. if br1h <= br2h and br1h < 5:
  1158. print("Mediterranean Avenue (-$50)")
  1159. if br2h <= br1h and br2h < 5:
  1160. print("Baltic Avenue (-$50)")
  1161. if cy1 == 1 and cy2 == 1 and cy3 == 1 and cy1m == 0 and cy2m == 0 and cy3m == 0:
  1162. if cy1h <= cy2h and cy1h <= cy3h and cy1h < 5:
  1163. print("Oriental Avenue (-$50)")
  1164. if cy2h <= cy1h and cy2h <= cy3h and cy2h < 5:
  1165. print("Vermont Avenue (-$50)")
  1166. if cy3h <= cy1h and cy3h <= cy2h and cy3h < 5:
  1167. print("Connecticut Avenue (-$50)")
  1168. if p1m >= 100:
  1169. if vi1 == 1 and vi2 == 1 and vi3 == 1 and vi1m == 0 and vi2m == 0 and vi3m == 0:
  1170. if vi1h <= vi2h and vi1h <= vi3h and vi1h < 5:
  1171. print("St. Charles Place (-$100)")
  1172. if vi2h <= vi1h and vi2h <= vi3h and vi2h < 5:
  1173. print("States Avenue (-$100)")
  1174. if vi3h <= vi1h and vi3h <= vi2h and vi3h < 5:
  1175. print("Virginia Avenue (-$100)")
  1176. if or1 == 1 and or2 == 1 and or3 == 1 and or1m == 0 and or2m == 0 and or3m == 0:
  1177. if or1h <= or2h and or1h <= or3h and or1h < 5:
  1178. print("St. James Place (-$100)")
  1179. if or2h <= or1h and or2h <= or3h and or2h < 5:
  1180. print("Tennessee Avenue (-$100)")
  1181. if or3h <= or1h and or3h <= or2h and or3h < 5:
  1182. print("New York Avenue (-$100)")
  1183. if p1m >= 150:
  1184. if red1 == 1 and red2 == 1 and red3 == 1 and red1m == 0 and red2m == 0 and red3m == 0:
  1185. if red1h <= red2h and red1h <= red3h and red1h < 5:
  1186. print("Kentucky Avenue (-$150)")
  1187. if red2h <= red1h and red2h <= red3h and red2h < 5:
  1188. print("Indiana Avenue (-$150)")
  1189. if cy3h <= red1h and red3h <= red2h and red3h < 5:
  1190. print("Illinois Avenue (-$150)")
  1191. if ye1 == 1 and ye2 == 1 and ye3 == 1 and ye1m == 0 and ye2m == 0 and ye3m == 0:
  1192. if ye1h <= ye2h and ye1h <= ye3h and ye1h < 5:
  1193. print("Atlantic Avenue (-$150)")
  1194. if ye2h <= ye1h and ye2h <= ye3h and ye2h < 5:
  1195. print("Ventnor Avenue (-$150)")
  1196. if ye3h <= ye1h and ye3h <= ye2h and ye3h < 5:
  1197. print("Marvin Gardens (-$150)")
  1198. if p1m >= 200:
  1199. if gr1 == 1 and gr2 == 1 and gr3 == 1 and gr1m == 0 and gr2m == 0 and gr3m == 0:
  1200. if gr1h <= gr2h and gr1h <= gr3h and gr1h < 5:
  1201. print("Pacific Avenue (-$200)")
  1202. if gr2h <= gr1h and gr2h <= gr3h and gr2h < 5:
  1203. print("North Carolina Avenue (-$200)")
  1204. if gr3h <= gr1h and gr3h <= gr2h and gr3h < 5:
  1205. print("Pennsylvania Avenue (-$200)")
  1206. if bl1 == 1 and bl2 == 1 and bl1m == 0 and bl2m == 0:
  1207. if bl1h <= bl2h and bl1h < 5:
  1208. print("Park Place (-$200)")
  1209. if bl2h <= bl1h and bl2h < 5:
  1210. print("Boardwalk (-$200)")
  1211. print("``````````````````````````")
  1212. print("(Type 'Done' to finish)")
  1213. p1hc = input()
  1214. print()
  1215. #If player tries to build house on Mediterranean Avenue...
  1216. if p1hc == "Mediterranean Avenue":
  1217. if p1m >= 50 and br1 == 1 and br2 == 1 and br1m == 0 and br2m == 0 and br1h <= br2h and br1h < 5:
  1218. if br1h < 4:
  1219. print("Built a house on Mediterranean Avenue!")
  1220. elif br1h == 4:
  1221. print("Built a hotel on Mediterranean Avenue!")
  1222. br1h = br1h + 1
  1223. p1m = p1m - 50
  1224. #Determines how many houses to display
  1225. if br1h == 1:
  1226. h1.shape(house)
  1227. h1.st()
  1228. if br1h == 2:
  1229. h1.shape(house2)
  1230. if br1h == 3:
  1231. h1.shape(house3)
  1232. if br1h == 4:
  1233. h1.shape(house4)
  1234. if br1h == 5:
  1235. h1.shape(hotel)
  1236. else:
  1237. print("Unable to build on Mediterranean Avenue.")
  1238. #If player tries to build house on Baltic Avenue...
  1239. if p1hc == "Baltic Avenue":
  1240. if p1m >= 50 and br1 == 1 and br2 == 1 and br1m == 0 and br2m == 0 and br2h <= br1h and br2h < 5:
  1241. if br2h < 4:
  1242. print("Built a house on Baltic Avenue!")
  1243. elif br2h == 4:
  1244. print("Built a hotel on Baltic Avenue!")
  1245. br2h = br2h + 1
  1246. p1m = p1m - 50
  1247. #Determines how many houses to display
  1248. if br2h == 1:
  1249. h2.shape(house)
  1250. h2.st()
  1251. if br2h == 2:
  1252. h2.shape(house2)
  1253. if br2h == 3:
  1254. h2.shape(house3)
  1255. if br2h == 4:
  1256. h2.shape(house4)
  1257. if br2h == 5:
  1258. h2.shape(hotel)
  1259. else:
  1260. print("Unable to build on Baltic Avenue.")
  1261. #If player tries to build house on Oriental Avenue...
  1262. if p1hc == "Oriental Avenue":
  1263. if p1m >= 50 and cy1 == 1 and cy2 == 1 and cy3 == 1 and cy1m == 0 and cy2m == 0 and cy3m == 0 and cy1h <= cy2h and cy1h <= cy3h and cy1h < 5:
  1264. if cy1h < 4:
  1265. print("Built a house on Oriental Avenue!")
  1266. elif cy1h == 4:
  1267. print("Built a hotel on Oriental Avenue!")
  1268. cy1h = cy1h + 1
  1269. p1m = p1m - 50
  1270. #Determines how many houses to display
  1271. if cy1h == 1:
  1272. h3.shape(house)
  1273. h3.st()
  1274. if cy1h == 2:
  1275. h3.shape(house2)
  1276. if cy1h == 3:
  1277. h3.shape(house3)
  1278. if cy1h == 4:
  1279. h3.shape(house4)
  1280. if cy1h == 5:
  1281. h3.shape(hotel)
  1282. else:
  1283. print("Unable to build on Oriental Avenue.")
  1284. #If player tries to build house on Vermont Avenue...
  1285. if p1hc == "Vermont Avenue":
  1286. if p1m >= 50 and cy1 == 1 and cy2 == 1 and cy3 == 1 and cy1m == 0 and cy2m == 0 and cy3m == 0 and cy2h <= cy1h and cy2h <= cy3h and cy2h < 5:
  1287. if cy2h < 4:
  1288. print("Built a house on Vermont Avenue!")
  1289. elif cy2h == 4:
  1290. print("Built a hotel on Vermont Avenue!")
  1291. cy2h = cy2h + 1
  1292. p1m = p1m - 50
  1293. #Determines how many houses to display
  1294. if cy2h == 1:
  1295. h4.shape(house)
  1296. h4.st()
  1297. if cy2h == 2:
  1298. h4.shape(house2)
  1299. if cy2h == 3:
  1300. h4.shape(house3)
  1301. if cy2h == 4:
  1302. h4.shape(house4)
  1303. if cy2h == 5:
  1304. h4.shape(hotel)
  1305. else:
  1306. print("Unable to build on Vermont Avenue.")
  1307. #If player tries to build house on Connecticut Avenue...
  1308. if p1hc == "Connecticut Avenue":
  1309. if p1m >= 50 and cy1 == 1 and cy2 == 1 and cy3 == 1 and cy1m == 0 and cy2m == 0 and cy3m == 0 and cy3h <= cy1h and cy3h <= cy2h and cy3h < 5:
  1310. if cy3h < 4:
  1311. print("Built a house on Connecticut Avenue!")
  1312. elif cy3h == 4:
  1313. print("Built a hotel on Connecticut Avenue!")
  1314. cy3h = cy3h + 1
  1315. p1m = p1m - 50
  1316. #Determines how many houses to display
  1317. if cy3h == 1:
  1318. h5.shape(house)
  1319. h5.st()
  1320. if cy3h == 2:
  1321. h5.shape(house2)
  1322. if cy3h == 3:
  1323. h5.shape(house3)
  1324. if cy3h == 4:
  1325. h5.shape(house4)
  1326. if cy3h == 5:
  1327. h5.shape(hotel)
  1328. else:
  1329. print("Unable to build on Connecticut Avenue.")
  1330.  
  1331. #If player chooses to sell houses...
  1332. elif p1c == "s":
  1333. p1hc = "x"
  1334.  
  1335. #If player chooses to trade...
  1336. elif p1c == "t":
  1337. p1tc = "x"
  1338.  
  1339. #If player gives an invalid response...
  1340. else:
  1341. print("\nInvalid response.")
  1342. ########Sets dice value
  1343. if p1j == 0:
  1344. die1 = random.randint(1, 6)
  1345. die2 = random.randint(1, 6)
  1346. print(p1, "rolled a", str(die1), "and a", str(die2) + "!\n")
  1347. ############Checks to make sure player space is below 40
  1348. for i in range(die1 + die2):
  1349. if p1s < 40:
  1350. if p1x > -333 and p1y == -335:
  1351. if p1s == 0 or p1s == 9:
  1352. p1x = p1x - 82
  1353. else:
  1354. p1x = p1x - 63
  1355. elif p1x == -333 and p1y < 333:
  1356. if p1s == 10 or p1s == 19:
  1357. p1y = p1y + 82
  1358. else:
  1359. p1y = p1y + 63
  1360. elif p1x < 335 and p1y == 333:
  1361. if p1s == 20 or p1s == 29:
  1362. p1x = p1x + 82
  1363. else:
  1364. p1x = p1x + 63
  1365. elif p1x == 335 and p1y > -335:
  1366. if p1s == 30 or p1s == 39:
  1367. p1y = p1y - 82
  1368. else:
  1369. p1y = p1y - 63
  1370. #Sets player position on board
  1371. player1.setpos(p1x, p1y)
  1372. #Increases space player resides on
  1373. p1s = p1s + 1
  1374. #Resets player 1 space count to 0 when passing 39
  1375. if p1s == 40:
  1376. print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
  1377. print(p1, "collects $200 for crossing Go!")
  1378. print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
  1379. p1m = p1m + 200
  1380. p1s = 0
  1381.  
  1382. ############Tells what space player lands on
  1383. print("Landed on", space[p1s] + ".", end='')
  1384. input()
  1385.  
  1386. ############If player lands on Mediterranean Avenue...
  1387. if p1s == 1:
  1388. print()
  1389. #If property is unowned...
  1390. if br1 == 0:
  1391. price = 60
  1392. #Checks to ensure y/n answer is given
  1393. while buy != "y" and buy != "n":
  1394. buy = input("Do you want to buy Mediterranean Avenue for $60? (y/n): ")
  1395. #If player wants to buy the property...
  1396. if buy == "y":
  1397. #Success!
  1398. if p1m >= 60:
  1399. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  1400. p1m = p1m - price
  1401. br1 = 1
  1402. #Not enough money!
  1403. else:
  1404. print("Insufficient funds.")
  1405. #If player doesn't want to buy the property...
  1406. elif buy == "n":
  1407. print(p1, "chose to ignore the property.")
  1408. #If player gives a response that is not "y" or "n"...
  1409. else:
  1410. print("Invalid response.")
  1411. #If Player One owns the property...
  1412. elif br1 == 1:
  1413. print(p1, "stays a free night in their own property.")
  1414. #If Player Two owns the property...
  1415. elif br1 == 2:
  1416. #If property is not mortgaged...
  1417. if br1m == 0:
  1418. br1r = 2
  1419. #If player owns a Monopoly over all colors of the property...
  1420. if br2 == 2:
  1421. br1r = 4
  1422. #If player has 1 house on property...
  1423. if br1h == 1:
  1424. br1r = 10
  1425. #If player has 2 houses on property...
  1426. elif br1h == 2:
  1427. br1r = 30
  1428. #If player has 3 houses on property...
  1429. elif br1h == 3:
  1430. br1r = 90
  1431. #If player has 4 houses on property...
  1432. elif br1h == 4:
  1433. br1r = 160
  1434. #If player has a hotel on property...
  1435. elif br1h == 5:
  1436. br1r = 250
  1437. #If player does not own a Monopoly over all colors of the property...
  1438. elif br2 != 2:
  1439. br1r = 2
  1440. #Player One pays Player Two rent
  1441. print(p1, "pays", p2, "$" + str(br1r) + "!")
  1442. p1m = p1m - br1r
  1443. p2m = p2m + br1r
  1444. #If property is mortgaged...
  1445. elif br1m == 1:
  1446. print("Mediterranean Avenue is currently mortgaged.")
  1447.  
  1448. ############If player lands on Baltic Avenue...
  1449. if p1s == 3:
  1450. print()
  1451. #If property is unowned...
  1452. if br2 == 0:
  1453. price = 60
  1454. #Checks to ensure y/n answer is given
  1455. while buy != "y" and buy != "n":
  1456. buy = input("Do you want to buy Baltic Avenue for $60? (y/n): ")
  1457. #If player wants to buy the property...
  1458. if buy == "y":
  1459. #Success!
  1460. if p1m >= 60:
  1461. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  1462. p1m = p1m - price
  1463. br2 = 1
  1464. #Not enough money!
  1465. else:
  1466. print("Insufficient funds.")
  1467. #If player doesn't want to buy the property...
  1468. elif buy == "n":
  1469. print(p1, "chose to ignore the property.")
  1470. #If player gives a response that is not "y" or "n"...
  1471. else:
  1472. print("Invalid response.")
  1473. #If Player One owns the property...
  1474. elif br2 == 1:
  1475. print(p1, "stays a free night in their own property.")
  1476. #If Player Two owns the property...
  1477. elif br2 == 2:
  1478. #If property is not mortgaged...
  1479. if br2m == 0:
  1480. br2r = 4
  1481. #If player owns a Monopoly over all colors of the property...
  1482. if br1 == 2:
  1483. br2r = 8
  1484. #If player has 1 house on property...
  1485. if br2h == 1:
  1486. br2r = 20
  1487. #If player has 2 houses on property...
  1488. elif br2h == 2:
  1489. br2r = 60
  1490. #If player has 3 houses on property...
  1491. elif br2h == 3:
  1492. br2r = 180
  1493. #If player has 4 houses on property...
  1494. elif br2h == 4:
  1495. br2r = 320
  1496. #If player has a hotel on property...
  1497. elif br2h == 5:
  1498. br2r = 450
  1499. #If player does not own a Monopoly over all colors of the property...
  1500. elif br1 != 2:
  1501. br2r = 4
  1502. #Player One pays Player Two rent
  1503. print(p1, "pays", p2, "$" + str(br2r) + "!")
  1504. p1m = p1m - br2r
  1505. p2m = p2m + br2r
  1506. #If property is mortgaged...
  1507. elif br2m == 1:
  1508. print("Baltic Avenue is currently mortgaged.")
  1509.  
  1510. ############If player lands on Oriental Avenue...
  1511. if p1s == 6:
  1512. print()
  1513. #If property is unowned...
  1514. if cy1 == 0:
  1515. price = 100
  1516. #Checks to ensure y/n answer is given
  1517. while buy != "y" and buy != "n":
  1518. buy = input("Do you want to buy Oriental Avenue for $100? (y/n): ")
  1519. #If player wants to buy the property...
  1520. if buy == "y":
  1521. #Success!
  1522. if p1m >= 100:
  1523. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  1524. p1m = p1m - price
  1525. cy1 = 1
  1526. #Not enough money!
  1527. else:
  1528. print("Insufficient funds.")
  1529. #If player doesn't want to buy the property...
  1530. elif buy == "n":
  1531. print(p1, "chose to ignore the property.")
  1532. #If player gives a response that is not "y" or "n"...
  1533. else:
  1534. print("Invalid response.")
  1535. #If Player One owns the property...
  1536. elif cy1 == 1:
  1537. print(p1, "stays a free night in their own property.")
  1538. #If Player Two owns the property...
  1539. elif cy1 == 2:
  1540. #If property is not mortgaged...
  1541. if cy1m == 0:
  1542. cy1r = 6
  1543. #If player owns a Monopoly over all colors of the property...
  1544. if cy2 == 2 and cy3 == 2:
  1545. cy1r = 12
  1546. #If player has 1 house on property...
  1547. if cy1h == 1:
  1548. cy1r = 30
  1549. #If player has 2 houses on property...
  1550. elif cy1h == 2:
  1551. cy1r = 90
  1552. #If player has 3 houses on property...
  1553. elif cy1h == 3:
  1554. cy1r = 270
  1555. #If player has 4 houses on property...
  1556. elif cy1h == 4:
  1557. cy1r = 400
  1558. #If player has a hotel on property...
  1559. elif cy1h == 5:
  1560. cy1r = 550
  1561. #If player does not own a Monopoly over all colors of the property...
  1562. elif cy2 != 2 or cy3 != 2:
  1563. cy1r = 6
  1564. #Player One pays Player Two rent
  1565. print(p1, "pays", p2, "$" + str(cy1r) + "!")
  1566. p1m = p1m - cy1r
  1567. p2m = p2m + cy1r
  1568. #If property is mortgaged...
  1569. elif cy1m == 1:
  1570. print("Oriental Avenue is currently mortgaged.")
  1571.  
  1572. ############If player lands on Vermont Avenue...
  1573. if p1s == 8:
  1574. print()
  1575. #If property is unowned...
  1576. if cy2 == 0:
  1577. price = 100
  1578. #Checks to ensure y/n answer is given
  1579. while buy != "y" and buy != "n":
  1580. buy = input("Do you want to buy Vermont Avenue for $100? (y/n): ")
  1581. #If player wants to buy the property...
  1582. if buy == "y":
  1583. #Success!
  1584. if p1m >= 100:
  1585. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  1586. p1m = p1m - price
  1587. cy2 = 1
  1588. #Not enough money!
  1589. else:
  1590. print("Insufficient funds.")
  1591. #If player doesn't want to buy the property...
  1592. elif buy == "n":
  1593. print(p1, "chose to ignore the property.")
  1594. #If player gives a response that is not "y" or "n"...
  1595. else:
  1596. print("Invalid response.")
  1597. #If Player One owns the property...
  1598. elif cy2 == 1:
  1599. print(p1, "stays a free night in their own property.")
  1600. #If Player Two owns the property...
  1601. elif cy2 == 2:
  1602. #If property is not mortgaged...
  1603. if cy2m == 0:
  1604. cy2r = 6
  1605. #If player owns a Monopoly over all colors of the property...
  1606. if cy1 == 2 and cy3 == 2:
  1607. cy2r = 12
  1608. #If player has 1 house on property...
  1609. if cy2h == 1:
  1610. cy2r = 30
  1611. #If player has 2 houses on property...
  1612. elif cy2h == 2:
  1613. cy2r = 90
  1614. #If player has 3 houses on property...
  1615. elif cy2h == 3:
  1616. cy2r = 270
  1617. #If player has 4 houses on property...
  1618. elif cy2h == 4:
  1619. cy2r = 400
  1620. #If player has a hotel on property...
  1621. elif cy2h == 5:
  1622. cy2r = 550
  1623. #If player does not own a Monopoly over all colors of the property...
  1624. elif cy1 != 2 or cy3 != 2:
  1625. cy2r = 6
  1626. #Player One pays Player Two rent
  1627. print(p1, "pays", p2, "$" + str(cy2r) + "!")
  1628. p1m = p1m - cy2r
  1629. p2m = p2m + cy2r
  1630. #If property is mortgaged...
  1631. elif cy2m == 1:
  1632. print("Vermont Avenue is currently mortgaged.")
  1633.  
  1634. ############If player lands on Connecticut Avenue...
  1635. if p1s == 9:
  1636. print()
  1637. #If property is unowned...
  1638. if cy3 == 0:
  1639. price = 120
  1640. #Checks to ensure y/n answer is given
  1641. while buy != "y" and buy != "n":
  1642. buy = input("Do you want to buy Connecticut Avenue for $120? (y/n): ")
  1643. #If player wants to buy the property...
  1644. if buy == "y":
  1645. #Success!
  1646. if p1m >= 120:
  1647. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  1648. p1m = p1m - price
  1649. cy3 = 1
  1650. #Not enough money!
  1651. else:
  1652. print("Insufficient funds.")
  1653. #If player doesn't want to buy the property...
  1654. elif buy == "n":
  1655. print(p1, "chose to ignore the property.")
  1656. #If player gives a response that is not "y" or "n"...
  1657. else:
  1658. print("Invalid response.")
  1659. #If Player One owns the property...
  1660. elif cy3 == 1:
  1661. print(p1, "stays a free night in their own property.")
  1662. #If Player Two owns the property...
  1663. elif cy3 == 2:
  1664. #If property is not mortgaged...
  1665. if cy3m == 0:
  1666. cy3r = 8
  1667. #If player owns a Monopoly over all colors of the property...
  1668. if cy1 == 2 and cy2 == 2:
  1669. cy3r = 16
  1670. #If player has 1 house on property...
  1671. if cy3h == 1:
  1672. cy3r = 40
  1673. #If player has 2 houses on property...
  1674. elif cy3h == 2:
  1675. cy3r = 100
  1676. #If player has 3 houses on property...
  1677. elif cy3h == 3:
  1678. cy3r = 300
  1679. #If player has 4 houses on property...
  1680. elif cy3h == 4:
  1681. cy3r = 450
  1682. #If player has a hotel on property...
  1683. elif cy3h == 5:
  1684. cy3r = 600
  1685. #If player does not own a Monopoly over all colors of the property...
  1686. elif cy1 != 2 or cy2 != 2:
  1687. cy3r = 8
  1688. #Player One pays Player Two rent
  1689. print(p1, "pays", p2, "$" + str(cy3r) + "!")
  1690. p1m = p1m - cy3r
  1691. p2m = p2m + cy3r
  1692. #If property is mortgaged...
  1693. elif cy3m == 1:
  1694. print("Connecticut Avenue is currently mortgaged.")
  1695.  
  1696. ############If player lands on St. Charles Place...
  1697. if p1s == 11:
  1698. print()
  1699. #If property is unowned...
  1700. if vi1 == 0:
  1701. price = 140
  1702. #Checks to ensure y/n answer is given
  1703. while buy != "y" and buy != "n":
  1704. buy = input("Do you want to buy St. Charles Place for $140? (y/n): ")
  1705. #If player wants to buy the property...
  1706. if buy == "y":
  1707. #Success!
  1708. if p1m >= 140:
  1709. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  1710. p1m = p1m - price
  1711. vi1 = 1
  1712. #Not enough money!
  1713. else:
  1714. print("Insufficient funds.")
  1715. #If player doesn't want to buy the property...
  1716. elif buy == "n":
  1717. print(p1, "chose to ignore the property.")
  1718. #If player gives a response that is not "y" or "n"...
  1719. else:
  1720. print("Invalid response.")
  1721. #If Player One owns the property...
  1722. elif vi1 == 1:
  1723. print(p1, "stays a free night in their own property.")
  1724. #If Player Two owns the property...
  1725. elif vi1 == 2:
  1726. #If property is not mortgaged...
  1727. if vi1m == 0:
  1728. vi1r = 10
  1729. #If player owns a Monopoly over all colors of the property...
  1730. if vi2 == 2 and vi3 == 2:
  1731. vi1r = 20
  1732. #If player has 1 house on property...
  1733. if vi1h == 1:
  1734. vi1r = 50
  1735. #If player has 2 houses on property...
  1736. elif vi1h == 2:
  1737. vi1r = 150
  1738. #If player has 3 houses on property...
  1739. elif vi1h == 3:
  1740. vi1r = 450
  1741. #If player has 4 houses on property...
  1742. elif vi1h == 4:
  1743. vi1r = 625
  1744. #If player has a hotel on property...
  1745. elif vi1h == 5:
  1746. vi1r = 750
  1747. #If player does not own a Monopoly over all colors of the property...
  1748. elif vi2 != 2 or vi3 != 2:
  1749. vi1r = 10
  1750. #Player One pays Player Two rent
  1751. print(p1, "pays", p2, "$" + str(vi1r) + "!")
  1752. p1m = p1m - vi1r
  1753. p2m = p2m + vi1r
  1754. #If property is mortgaged...
  1755. elif vi1m == 1:
  1756. print("St. Charles Place is currently mortgaged.")
  1757.  
  1758. ############If player lands on States Avenue...
  1759. if p1s == 13:
  1760. print()
  1761. #If property is unowned...
  1762. if vi2 == 0:
  1763. price = 140
  1764. #Checks to ensure y/n answer is given
  1765. while buy != "y" and buy != "n":
  1766. buy = input("Do you want to buy States Avenue for $140? (y/n): ")
  1767. #If player wants to buy the property...
  1768. if buy == "y":
  1769. #Success!
  1770. if p1m >= 140:
  1771. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  1772. p1m = p1m - price
  1773. vi2 = 1
  1774. #Not enough money!
  1775. else:
  1776. print("Insufficient funds.")
  1777. #If player doesn't want to buy the property...
  1778. elif buy == "n":
  1779. print(p1, "chose to ignore the property.")
  1780. #If player gives a response that is not "y" or "n"...
  1781. else:
  1782. print("Invalid response.")
  1783. #If Player One owns the property...
  1784. elif vi2 == 1:
  1785. print(p1, "stays a free night in their own property.")
  1786. #If Player Two owns the property...
  1787. elif vi2 == 2:
  1788. #If property is not mortgaged...
  1789. if vi2m == 0:
  1790. vi2r = 10
  1791. #If player owns a Monopoly over all colors of the property...
  1792. if vi1 == 2 and vi3 == 2:
  1793. vi2r = 20
  1794. #If player has 1 house on property...
  1795. if vi2h == 1:
  1796. vi2r = 50
  1797. #If player has 2 houses on property...
  1798. elif vi2h == 2:
  1799. vi2r = 150
  1800. #If player has 3 houses on property...
  1801. elif vi2h == 3:
  1802. vi2r = 450
  1803. #If player has 4 houses on property...
  1804. elif vi2h == 4:
  1805. vi2r = 625
  1806. #If player has a hotel on property...
  1807. elif vi2h == 5:
  1808. vi2r = 750
  1809. #If player does not own a Monopoly over all colors of the property...
  1810. elif vi1 != 2 or vi3 != 2:
  1811. vi2r = 10
  1812. #Player One pays Player Two rent
  1813. print(p1, "pays", p2, "$" + str(vi2r) + "!")
  1814. p1m = p1m - vi2r
  1815. p2m = p2m + vi2r
  1816. #If property is mortgaged...
  1817. elif vi2m == 1:
  1818. print("States Avenue is currently mortgaged.")
  1819.  
  1820. ############If player lands on Virginia Avenue...
  1821. if p1s == 14:
  1822. print()
  1823. #If property is unowned...
  1824. if vi3 == 0:
  1825. price = 160
  1826. #Checks to ensure y/n answer is given
  1827. while buy != "y" and buy != "n":
  1828. buy = input("Do you want to buy Virginia Avenue for $160? (y/n): ")
  1829. #If player wants to buy the property...
  1830. if buy == "y":
  1831. #Success!
  1832. if p1m >= 160:
  1833. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  1834. p1m = p1m - price
  1835. vi3 = 1
  1836. #Not enough money!
  1837. else:
  1838. print("Insufficient funds.")
  1839. #If player doesn't want to buy the property...
  1840. elif buy == "n":
  1841. print(p1, "chose to ignore the property.")
  1842. #If player gives a response that is not "y" or "n"...
  1843. else:
  1844. print("Invalid response.")
  1845. #If Player One owns the property...
  1846. elif vi3 == 1:
  1847. print(p1, "stays a free night in their own property.")
  1848. #If Player Two owns the property...
  1849. elif vi3 == 2:
  1850. #If property is not mortgaged...
  1851. if vi3m == 0:
  1852. vi3r = 12
  1853. #If player owns a Monopoly over all colors of the property...
  1854. if vi1 == 2 and vi2 == 2:
  1855. vi3r = 24
  1856. #If player has 1 house on property...
  1857. if vi3h == 1:
  1858. vi3r = 60
  1859. #If player has 2 houses on property...
  1860. elif vi3h == 2:
  1861. vi3r = 180
  1862. #If player has 3 houses on property...
  1863. elif vi3h == 3:
  1864. vi3r = 500
  1865. #If player has 4 houses on property...
  1866. elif vi3h == 4:
  1867. vi3r = 700
  1868. #If player has a hotel on property...
  1869. elif vi3h == 5:
  1870. vi3r = 900
  1871. #If player does not own a Monopoly over all colors of the property...
  1872. elif vi1 != 2 or vi2 != 2:
  1873. vi3r = 12
  1874. #Player One pays Player Two rent
  1875. print(p1, "pays", p2, "$" + str(vi3r) + "!")
  1876. p1m = p1m - vi3r
  1877. p2m = p2m + vi3r
  1878. #If property is mortgaged...
  1879. elif vi3m == 1:
  1880. print("Virginia Avenue is currently mortgaged.")
  1881.  
  1882. ############If player lands on St. James Place...
  1883. if p1s == 16:
  1884. print()
  1885. #If property is unowned...
  1886. if or1 == 0:
  1887. price = 180
  1888. #Checks to ensure y/n answer is given
  1889. while buy != "y" and buy != "n":
  1890. buy = input("Do you want to buy St. James Place for $180? (y/n): ")
  1891. #If player wants to buy the property...
  1892. if buy == "y":
  1893. #Success!
  1894. if p1m >= 180:
  1895. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  1896. p1m = p1m - price
  1897. or1 = 1
  1898. #Not enough money!
  1899. else:
  1900. print("Insufficient funds.")
  1901. #If player doesn't want to buy the property...
  1902. elif buy == "n":
  1903. print(p1, "chose to ignore the property.")
  1904. #If player gives a response that is not "y" or "n"...
  1905. else:
  1906. print("Invalid response.")
  1907. #If Player One owns the property...
  1908. elif or1 == 1:
  1909. print(p1, "stays a free night in their own property.")
  1910. #If Player Two owns the property...
  1911. elif or1 == 2:
  1912. #If property is not mortgaged...
  1913. if or1m == 0:
  1914. or1r = 14
  1915. #If player owns a Monopoly over all colors of the property...
  1916. if or2 == 2 and or3 == 2:
  1917. or1r = 28
  1918. #If player has 1 house on property...
  1919. if or1h == 1:
  1920. or1r = 70
  1921. #If player has 2 houses on property...
  1922. elif or1h == 2:
  1923. or1r = 200
  1924. #If player has 3 houses on property...
  1925. elif or1h == 3:
  1926. or1r = 550
  1927. #If player has 4 houses on property...
  1928. elif or1h == 4:
  1929. or1r = 750
  1930. #If player has a hotel on property...
  1931. elif or1h == 5:
  1932. or1r = 950
  1933. #If player does not own a Monopoly over all colors of the property...
  1934. elif or2 != 2 or or3 != 2:
  1935. or1r = 14
  1936. #Player One pays Player Two rent
  1937. print(p1, "pays", p2, "$" + str(or1r) + "!")
  1938. p1m = p1m - or1r
  1939. p2m = p2m + or1r
  1940. #If property is mortgaged...
  1941. elif or1m == 1:
  1942. print("St. James Place is currently mortgaged.")
  1943.  
  1944. ############If player lands on Tennessee Avenue...
  1945. if p1s == 18:
  1946. print()
  1947. #If property is unowned...
  1948. if or2 == 0:
  1949. price = 180
  1950. #Checks to ensure y/n answer is given
  1951. while buy != "y" and buy != "n":
  1952. buy = input("Do you want to buy Tennessee Avenue for $180? (y/n): ")
  1953. #If player wants to buy the property...
  1954. if buy == "y":
  1955. #Success!
  1956. if p1m >= 180:
  1957. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  1958. p1m = p1m - price
  1959. or2 = 1
  1960. #Not enough money!
  1961. else:
  1962. print("Insufficient funds.")
  1963. #If player doesn't want to buy the property...
  1964. elif buy == "n":
  1965. print(p1, "chose to ignore the property.")
  1966. #If player gives a response that is not "y" or "n"...
  1967. else:
  1968. print("Invalid response.")
  1969. #If Player One owns the property...
  1970. elif or2 == 1:
  1971. print(p1, "stays a free night in their own property.")
  1972. #If Player Two owns the property...
  1973. elif or2 == 2:
  1974. #If property is not mortgaged...
  1975. if or2m == 0:
  1976. or2r = 14
  1977. #If player owns a Monopoly over all colors of the property...
  1978. if or1 == 2 and or3 == 2:
  1979. or2r = 28
  1980. #If player has 1 house on property...
  1981. if or2h == 1:
  1982. or2r = 70
  1983. #If player has 2 houses on property...
  1984. elif or2h == 2:
  1985. or2r = 200
  1986. #If player has 3 houses on property...
  1987. elif or2h == 3:
  1988. or2r = 550
  1989. #If player has 4 houses on property...
  1990. elif or2h == 4:
  1991. or2r = 750
  1992. #If player has a hotel on property...
  1993. elif or2h == 5:
  1994. or2r = 950
  1995. #If player does not own a Monopoly over all colors of the property...
  1996. elif or1 != 2 or or3 != 2:
  1997. or2r = 14
  1998. #Player One pays Player Two rent
  1999. print(p1, "pays", p2, "$" + str(or2r) + "!")
  2000. p1m = p1m - or2r
  2001. p2m = p2m + or2r
  2002. #If property is mortgaged...
  2003. elif or2m == 1:
  2004. print("Tennessee Avenue is currently mortgaged.")
  2005.  
  2006. ############If player lands on New York Avenue...
  2007. if p1s == 19:
  2008. print()
  2009. #If property is unowned...
  2010. if or3 == 0:
  2011. price = 200
  2012. #Checks to ensure y/n answer is given
  2013. while buy != "y" and buy != "n":
  2014. buy = input("Do you want to buy New York Avenue for $200? (y/n): ")
  2015. #If player wants to buy the property...
  2016. if buy == "y":
  2017. #Success!
  2018. if p1m >= 200:
  2019. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  2020. p1m = p1m - price
  2021. or3 = 1
  2022. #Not enough money!
  2023. else:
  2024. print("Insufficient funds.")
  2025. #If player doesn't want to buy the property...
  2026. elif buy == "n":
  2027. print(p1, "chose to ignore the property.")
  2028. #If player gives a response that is not "y" or "n"...
  2029. else:
  2030. print("Invalid response.")
  2031. #If Player One owns the property...
  2032. elif or3 == 1:
  2033. print(p1, "stays a free night in their own property.")
  2034. #If Player Two owns the property...
  2035. elif or3 == 2:
  2036. #If property is not mortgaged...
  2037. if or3m == 0:
  2038. or3r = 16
  2039. #If player owns a Monopoly over all colors of the property...
  2040. if or1 == 2 and or2 == 2:
  2041. or3r = 32
  2042. #If player has 1 house on property...
  2043. if or3h == 1:
  2044. or3r = 80
  2045. #If player has 2 houses on property...
  2046. elif or3h == 2:
  2047. or3r = 220
  2048. #If player has 3 houses on property...
  2049. elif or3h == 3:
  2050. or3r = 600
  2051. #If player has 4 houses on property...
  2052. elif or3h == 4:
  2053. or3r = 800
  2054. #If player has a hotel on property...
  2055. elif or3h == 5:
  2056. or3r = 1000
  2057. #If player does not own a Monopoly over all colors of the property...
  2058. elif or1 != 2 or or2 != 2:
  2059. or3r = 16
  2060. #Player One pays Player Two rent
  2061. print(p1, "pays", p2, "$" + str(or3r) + "!")
  2062. p1m = p1m - or3r
  2063. p2m = p2m + or3r
  2064. #If property is mortgaged...
  2065. elif or3m == 1:
  2066. print("New York Avenue is currently mortgaged.")
  2067.  
  2068. ############If player lands on Kentucky Avenue...
  2069. if p1s == 21:
  2070. print()
  2071. #If property is unowned...
  2072. if red1 == 0:
  2073. price = 220
  2074. #Checks to ensure y/n answer is given
  2075. while buy != "y" and buy != "n":
  2076. buy = input("Do you want to buy Kentucky Avenue for $220? (y/n): ")
  2077. #If player wants to buy the property...
  2078. if buy == "y":
  2079. #Success!
  2080. if p1m >= 220:
  2081. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  2082. p1m = p1m - price
  2083. red1 = 1
  2084. #Not enough money!
  2085. else:
  2086. print("Insufficient funds.")
  2087. #If player doesn't want to buy the property...
  2088. elif buy == "n":
  2089. print(p1, "chose to ignore the property.")
  2090. #If player gives a response that is not "y" or "n"...
  2091. else:
  2092. print("Invalid response.")
  2093. #If Player One owns the property...
  2094. elif red1 == 1:
  2095. print(p1, "stays a free night in their own property.")
  2096. #If Player Two owns the property...
  2097. elif red1 == 2:
  2098. #If property is not mortgaged...
  2099. if red1m == 0:
  2100. red1r = 18
  2101. #If player owns a Monopoly over all colors of the property...
  2102. if red2 == 2 and red3 == 2:
  2103. red1r = 36
  2104. #If player has 1 house on property...
  2105. if red1h == 1:
  2106. red1r = 90
  2107. #If player has 2 houses on property...
  2108. elif red1h == 2:
  2109. red1r = 250
  2110. #If player has 3 houses on property...
  2111. elif red1h == 3:
  2112. red1r = 700
  2113. #If player has 4 houses on property...
  2114. elif red1h == 4:
  2115. red1r = 875
  2116. #If player has a hotel on property...
  2117. elif red1h == 5:
  2118. red1r = 1050
  2119. #If player does not own a Monopoly over all colors of the property...
  2120. elif red2 != 2 or red3 != 2:
  2121. red1r = 18
  2122. #Player One pays Player Two rent
  2123. print(p1, "pays", p2, "$" + str(red1r) + "!")
  2124. p1m = p1m - red1r
  2125. p2m = p2m + red1r
  2126. #If property is mortgaged...
  2127. elif red1m == 1:
  2128. print("Kentucky Avenue is currently mortgaged.")
  2129.  
  2130. ############If player lands on Indiana Avenue...
  2131. if p1s == 23:
  2132. print()
  2133. #If property is unowned...
  2134. if red2 == 0:
  2135. price = 220
  2136. #Checks to ensure y/n answer is given
  2137. while buy != "y" and buy != "n":
  2138. buy = input("Do you want to buy Indiana Avenue for $220? (y/n): ")
  2139. #If player wants to buy the property...
  2140. if buy == "y":
  2141. #Success!
  2142. if p1m >= 220:
  2143. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  2144. p1m = p1m - price
  2145. red2 = 1
  2146. #Not enough money!
  2147. else:
  2148. print("Insufficient funds.")
  2149. #If player doesn't want to buy the property...
  2150. elif buy == "n":
  2151. print(p1, "chose to ignore the property.")
  2152. #If player gives a response that is not "y" or "n"...
  2153. else:
  2154. print("Invalid response.")
  2155. #If Player One owns the property...
  2156. elif red2 == 1:
  2157. print(p1, "stays a free night in their own property.")
  2158. #If Player Two owns the property...
  2159. elif red2 == 2:
  2160. #If property is not mortgaged...
  2161. if red2m == 0:
  2162. red2r = 18
  2163. #If player owns a Monopoly over all colors of the property...
  2164. if red1 == 2 and red3 == 2:
  2165. red2r = 36
  2166. #If player has 1 house on property...
  2167. if red2h == 1:
  2168. red2r = 90
  2169. #If player has 2 houses on property...
  2170. elif red2h == 2:
  2171. red2r = 250
  2172. #If player has 3 houses on property...
  2173. elif red2h == 3:
  2174. red2r = 700
  2175. #If player has 4 houses on property...
  2176. elif red2h == 4:
  2177. red2r = 875
  2178. #If player has a hotel on property...
  2179. elif red2h == 5:
  2180. red2r = 1050
  2181. #If player does not own a Monopoly over all colors of the property...
  2182. elif red1 != 2 or red3 != 2:
  2183. red2r = 18
  2184. #Player One pays Player Two rent
  2185. print(p1, "pays", p2, "$" + str(red2r) + "!")
  2186. p1m = p1m - red2r
  2187. p2m = p2m + red2r
  2188. #If property is mortgaged...
  2189. elif red2m == 1:
  2190. print("Indiana Avenue is currently mortgaged.")
  2191.  
  2192. ############If player lands on Illinois Avenue...
  2193. if p1s == 24:
  2194. print()
  2195. #If property is unowned...
  2196. if red3 == 0:
  2197. price = 240
  2198. #Checks to ensure y/n answer is given
  2199. while buy != "y" and buy != "n":
  2200. buy = input("Do you want to buy Illinois Avenue for $240? (y/n): ")
  2201. #If player wants to buy the property...
  2202. if buy == "y":
  2203. #Success!
  2204. if p1m >= 240:
  2205. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  2206. p1m = p1m - price
  2207. red3 = 1
  2208. #Not enough money!
  2209. else:
  2210. print("Insufficient funds.")
  2211. #If player doesn't want to buy the property...
  2212. elif buy == "n":
  2213. print(p1, "chose to ignore the property.")
  2214. #If player gives a response that is not "y" or "n"...
  2215. else:
  2216. print("Invalid response.")
  2217. #If Player One owns the property...
  2218. elif red3 == 1:
  2219. print(p1, "stays a free night in their own property.")
  2220. #If Player Two owns the property...
  2221. elif red3 == 2:
  2222. #If property is not mortgaged...
  2223. if red3m == 0:
  2224. red3r = 20
  2225. #If player owns a Monopoly over all colors of the property...
  2226. if red1 == 2 and red2 == 2:
  2227. red3r = 40
  2228. #If player has 1 house on property...
  2229. if red3h == 1:
  2230. red3r = 100
  2231. #If player has 2 houses on property...
  2232. elif red3h == 2:
  2233. red3r = 300
  2234. #If player has 3 houses on property...
  2235. elif red3h == 3:
  2236. red3r = 750
  2237. #If player has 4 houses on property...
  2238. elif red3h == 4:
  2239. red3r = 925
  2240. #If player has a hotel on property...
  2241. elif red3h == 5:
  2242. red3r = 1100
  2243. #If player does not own a Monopoly over all colors of the property...
  2244. elif red1 != 2 or red2 != 2:
  2245. red3r = 20
  2246. #Player One pays Player Two rent
  2247. print(p1, "pays", p2, "$" + str(red3r) + "!")
  2248. p1m = p1m - red3r
  2249. p2m = p2m + red3r
  2250. #If property is mortgaged...
  2251. elif red3m == 1:
  2252. print("Illinois Avenue is currently mortgaged.")
  2253.  
  2254. ############If player lands on Atlantic Avenue...
  2255. if p1s == 26:
  2256. print()
  2257. #If property is unowned...
  2258. if ye1 == 0:
  2259. price = 260
  2260. #Checks to ensure y/n answer is given
  2261. while buy != "y" and buy != "n":
  2262. buy = input("Do you want to buy Atlantic Avenue for $260? (y/n): ")
  2263. #If player wants to buy the property...
  2264. if buy == "y":
  2265. #Success!
  2266. if p1m >= 260:
  2267. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  2268. p1m = p1m - price
  2269. ye1 = 1
  2270. #Not enough money!
  2271. else:
  2272. print("Insufficient funds.")
  2273. #If player doesn't want to buy the property...
  2274. elif buy == "n":
  2275. print(p1, "chose to ignore the property.")
  2276. #If player gives a response that is not "y" or "n"...
  2277. else:
  2278. print("Invalid response.")
  2279. #If Player One owns the property...
  2280. elif ye1 == 1:
  2281. print(p1, "stays a free night in their own property.")
  2282. #If Player Two owns the property...
  2283. elif ye1 == 2:
  2284. #If property is not mortgaged...
  2285. if ye1m == 0:
  2286. ye1r = 22
  2287. #If player owns a Monopoly over all colors of the property...
  2288. if ye2 == 2 and ye3 == 2:
  2289. ye1r = 44
  2290. #If player has 1 house on property...
  2291. if ye1h == 1:
  2292. ye1r = 110
  2293. #If player has 2 houses on property...
  2294. elif ye1h == 2:
  2295. ye1r = 330
  2296. #If player has 3 houses on property...
  2297. elif ye1h == 3:
  2298. ye1r = 800
  2299. #If player has 4 houses on property...
  2300. elif ye1h == 4:
  2301. ye1r = 975
  2302. #If player has a hotel on property...
  2303. elif ye1h == 5:
  2304. ye1r = 1150
  2305. #If player does not own a Monopoly over all colors of the property...
  2306. elif ye2 != 2 or ye3 != 2:
  2307. ye1r = 22
  2308. #Player One pays Player Two rent
  2309. print(p1, "pays", p2, "$" + str(ye1r) + "!")
  2310. p1m = p1m - ye1r
  2311. p2m = p2m + ye1r
  2312. #If property is mortgaged...
  2313. elif ye1m == 1:
  2314. print("Atlantic Avenue is currently mortgaged.")
  2315.  
  2316. ############If player lands on Ventnor Avenue...
  2317. if p1s == 27:
  2318. print()
  2319. #If property is unowned...
  2320. if ye2 == 0:
  2321. price = 260
  2322. #Checks to ensure y/n answer is given
  2323. while buy != "y" and buy != "n":
  2324. buy = input("Do you want to buy Ventnor Avenue for $260? (y/n): ")
  2325. #If player wants to buy the property...
  2326. if buy == "y":
  2327. #Success!
  2328. if p1m >= 260:
  2329. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  2330. p1m = p1m - price
  2331. ye2 = 1
  2332. #Not enough money!
  2333. else:
  2334. print("Insufficient funds.")
  2335. #If player doesn't want to buy the property...
  2336. elif buy == "n":
  2337. print(p1, "chose to ignore the property.")
  2338. #If player gives a response that is not "y" or "n"...
  2339. else:
  2340. print("Invalid response.")
  2341. #If Player One owns the property...
  2342. elif ye2 == 1:
  2343. print(p1, "stays a free night in their own property.")
  2344. #If Player Two owns the property...
  2345. elif ye2 == 2:
  2346. #If property is not mortgaged...
  2347. if ye2m == 0:
  2348. ye2r = 22
  2349. #If player owns a Monopoly over all colors of the property...
  2350. if ye1 == 2 and ye3 == 2:
  2351. ye2r = 44
  2352. #If player has 1 house on property...
  2353. if ye2h == 1:
  2354. ye2r = 110
  2355. #If player has 2 houses on property...
  2356. elif ye2h == 2:
  2357. ye2r = 330
  2358. #If player has 3 houses on property...
  2359. elif ye2h == 3:
  2360. ye2r = 800
  2361. #If player has 4 houses on property...
  2362. elif ye2h == 4:
  2363. ye2r = 975
  2364. #If player has a hotel on property...
  2365. elif ye2h == 5:
  2366. ye2r = 1150
  2367. #If player does not own a Monopoly over all colors of the property...
  2368. elif ye1 != 2 or ye3 != 2:
  2369. ye2r = 22
  2370. #Player One pays Player Two rent
  2371. print(p1, "pays", p2, "$" + str(ye2r) + "!")
  2372. p1m = p1m - ye2r
  2373. p2m = p2m + ye2r
  2374. #If property is mortgaged...
  2375. elif ye2m == 1:
  2376. print("Ventnor Avenue is currently mortgaged.")
  2377.  
  2378. ############If player lands on Marvin Gardens...
  2379. if p1s == 29:
  2380. print()
  2381. #If property is unowned...
  2382. if ye3 == 0:
  2383. price = 280
  2384. #Checks to ensure y/n answer is given
  2385. while buy != "y" and buy != "n":
  2386. buy = input("Do you want to buy Marvin Gardens for $280? (y/n): ")
  2387. #If player wants to buy the property...
  2388. if buy == "y":
  2389. #Success!
  2390. if p1m >= 280:
  2391. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  2392. p1m = p1m - price
  2393. ye3 = 1
  2394. #Not enough money!
  2395. else:
  2396. print("Insufficient funds.")
  2397. #If player doesn't want to buy the property...
  2398. elif buy == "n":
  2399. print(p1, "chose to ignore the property.")
  2400. #If player gives a response that is not "y" or "n"...
  2401. else:
  2402. print("Invalid response.")
  2403. #If Player One owns the property...
  2404. elif ye3 == 1:
  2405. print(p1, "stays a free night in their own property.")
  2406. #If Player Two owns the property...
  2407. elif ye3 == 2:
  2408. #If property is not mortgaged...
  2409. if ye3m == 0:
  2410. ye3r = 24
  2411. #If player owns a Monopoly over all colors of the property...
  2412. if ye1 == 2 and ye2 == 2:
  2413. ye3r = 48
  2414. #If player has 1 house on property...
  2415. if ye3h == 1:
  2416. ye3r = 120
  2417. #If player has 2 houses on property...
  2418. elif ye3h == 2:
  2419. ye3r = 360
  2420. #If player has 3 houses on property...
  2421. elif ye3h == 3:
  2422. ye3r = 850
  2423. #If player has 4 houses on property...
  2424. elif ye3h == 4:
  2425. ye3r = 1025
  2426. #If player has a hotel on property...
  2427. elif ye3h == 5:
  2428. ye3r = 1200
  2429. #If player does not own a Monopoly over all colors of the property...
  2430. elif ye1 != 2 or ye2 != 2:
  2431. ye3r = 24
  2432. #Player One pays Player Two rent
  2433. print(p1, "pays", p2, "$" + str(ye3r) + "!")
  2434. p1m = p1m - ye3r
  2435. p2m = p2m + ye3r
  2436. #If property is mortgaged...
  2437. elif ye3m == 1:
  2438. print("Marvin Gardens is currently mortgaged.")
  2439.  
  2440. ############If player lands on Pacific Avenue...
  2441. if p1s == 31:
  2442. print()
  2443. #If property is unowned...
  2444. if gr1 == 0:
  2445. price = 300
  2446. #Checks to ensure y/n answer is given
  2447. while buy != "y" and buy != "n":
  2448. buy = input("Do you want to buy Pacific Avenue for $300? (y/n): ")
  2449. #If player wants to buy the property...
  2450. if buy == "y":
  2451. #Success!
  2452. if p1m >= 300:
  2453. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  2454. p1m = p1m - price
  2455. gr1 = 1
  2456. #Not enough money!
  2457. else:
  2458. print("Insufficient funds.")
  2459. #If player doesn't want to buy the property...
  2460. elif buy == "n":
  2461. print(p1, "chose to ignore the property.")
  2462. #If player gives a response that is not "y" or "n"...
  2463. else:
  2464. print("Invalid response.")
  2465. #If Player One owns the property...
  2466. elif gr1 == 1:
  2467. print(p1, "stays a free night in their own property.")
  2468. #If Player Two owns the property...
  2469. elif gr1 == 2:
  2470. #If property is not mortgaged...
  2471. if gr1m == 0:
  2472. gr1r = 26
  2473. #If player owns a Monopoly over all colors of the property...
  2474. if gr2 == 2 and gr3 == 2:
  2475. gr1r = 52
  2476. #If player has 1 house on property...
  2477. if gr1h == 1:
  2478. gr1r = 130
  2479. #If player has 2 houses on property...
  2480. elif gr1h == 2:
  2481. gr1r = 390
  2482. #If player has 3 houses on property...
  2483. elif gr1h == 3:
  2484. gr1r = 900
  2485. #If player has 4 houses on property...
  2486. elif gr1h == 4:
  2487. gr1r = 1100
  2488. #If player has a hotel on property...
  2489. elif gr1h == 5:
  2490. gr1r = 1275
  2491. #If player does not own a Monopoly over all colors of the property...
  2492. elif gr2 != 2 or gr3 != 2:
  2493. gr1r = 26
  2494. #Player One pays Player Two rent
  2495. print(p1, "pays", p2, "$" + str(gr1r) + "!")
  2496. p1m = p1m - gr1r
  2497. p2m = p2m + gr1r
  2498. #If property is mortgaged...
  2499. elif gr1m == 1:
  2500. print("Pacific Avenue is currently mortgaged.")
  2501.  
  2502. ############If player lands on North Carolina Avenue...
  2503. if p1s == 32:
  2504. print()
  2505. #If property is unowned...
  2506. if gr2 == 0:
  2507. price = 300
  2508. #Checks to ensure y/n answer is given
  2509. while buy != "y" and buy != "n":
  2510. buy = input("Do you want to buy North Carolina Avenue for $300? (y/n): ")
  2511. #If player wants to buy the property...
  2512. if buy == "y":
  2513. #Success!
  2514. if p1m >= 300:
  2515. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  2516. p1m = p1m - price
  2517. gr2 = 1
  2518. #Not enough money!
  2519. else:
  2520. print("Insufficient funds.")
  2521. #If player doesn't want to buy the property...
  2522. elif buy == "n":
  2523. print(p1, "chose to ignore the property.")
  2524. #If player gives a response that is not "y" or "n"...
  2525. else:
  2526. print("Invalid response.")
  2527. #If Player One owns the property...
  2528. elif gr2 == 1:
  2529. print(p1, "stays a free night in their own property.")
  2530. #If Player Two owns the property...
  2531. elif gr2 == 2:
  2532. #If property is not mortgaged...
  2533. if gr2m == 0:
  2534. gr2r = 26
  2535. #If player owns a Monopoly over all colors of the property...
  2536. if gr1 == 2 and gr3 == 2:
  2537. gr2r = 52
  2538. #If player has 1 house on property...
  2539. if gr2h == 1:
  2540. gr2r = 130
  2541. #If player has 2 houses on property...
  2542. elif gr2h == 2:
  2543. gr2r = 390
  2544. #If player has 3 houses on property...
  2545. elif gr2h == 3:
  2546. gr2r = 900
  2547. #If player has 4 houses on property...
  2548. elif gr2h == 4:
  2549. gr2r = 1100
  2550. #If player has a hotel on property...
  2551. elif gr2h == 5:
  2552. gr2r = 1275
  2553. #If player does not own a Monopoly over all colors of the property...
  2554. elif gr1 != 2 or gr3 != 2:
  2555. gr2r = 26
  2556. #Player One pays Player Two rent
  2557. print(p1, "pays", p2, "$" + str(gr2r) + "!")
  2558. p1m = p1m - gr2r
  2559. p2m = p2m + gr2r
  2560. #If property is mortgaged...
  2561. elif gr2m == 1:
  2562. print("North Carolina Avenue is currently mortgaged.")
  2563.  
  2564. ############If player lands on Pennsylvania Avenue...
  2565. if p1s == 34:
  2566. print()
  2567. #If property is unowned...
  2568. if gr3 == 0:
  2569. price = 320
  2570. #Checks to ensure y/n answer is given
  2571. while buy != "y" and buy != "n":
  2572. buy = input("Do you want to buy Pennsylvania Avenue for $320? (y/n): ")
  2573. #If player wants to buy the property...
  2574. if buy == "y":
  2575. #Success!
  2576. if p1m >= 320:
  2577. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  2578. p1m = p1m - price
  2579. gr3 = 1
  2580. #Not enough money!
  2581. else:
  2582. print("Insufficient funds.")
  2583. #If player doesn't want to buy the property...
  2584. elif buy == "n":
  2585. print(p1, "chose to ignore the property.")
  2586. #If player gives a response that is not "y" or "n"...
  2587. else:
  2588. print("Invalid response.")
  2589. #If Player One owns the property...
  2590. elif gr3 == 1:
  2591. print(p1, "stays a free night in their own property.")
  2592. #If Player Two owns the property...
  2593. elif gr3 == 2:
  2594. #If property is not mortgaged...
  2595. if gr3m == 0:
  2596. gr3r = 28
  2597. #If player owns a Monopoly over all colors of the property...
  2598. if gr1 == 2 and gr2 == 2:
  2599. gr3r = 56
  2600. #If player has 1 house on property...
  2601. if gr3h == 1:
  2602. gr3r = 150
  2603. #If player has 2 houses on property...
  2604. elif gr3h == 2:
  2605. gr3r = 450
  2606. #If player has 3 houses on property...
  2607. elif gr3h == 3:
  2608. gr3r = 1000
  2609. #If player has 4 houses on property...
  2610. elif gr3h == 4:
  2611. gr3r = 1200
  2612. #If player has a hotel on property...
  2613. elif gr3h == 5:
  2614. gr3r = 1400
  2615. #If player does not own a Monopoly over all colors of the property...
  2616. elif gr1 != 2 or gr2 != 2:
  2617. gr3r = 28
  2618. #Player One pays Player Two rent
  2619. print(p1, "pays", p2, "$" + str(gr3r) + "!")
  2620. p1m = p1m - gr3r
  2621. p2m = p2m + gr3r
  2622. #If property is mortgaged...
  2623. elif gr3m == 1:
  2624. print("Pennsylvania Avenue is currently mortgaged.")
  2625.  
  2626. ############If player lands on Park Place...
  2627. if p1s == 37:
  2628. print()
  2629. #If property is unowned...
  2630. if bl1 == 0:
  2631. price = 350
  2632. #Checks to ensure y/n answer is given
  2633. while buy != "y" and buy != "n":
  2634. buy = input("Do you want to buy Park Place for $350? (y/n): ")
  2635. #If player wants to buy the property...
  2636. if buy == "y":
  2637. #Success!
  2638. if p1m >= 350:
  2639. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  2640. p1m = p1m - price
  2641. bl1 = 1
  2642. #Not enough money!
  2643. else:
  2644. print("Insufficient funds.")
  2645. #If player doesn't want to buy the property...
  2646. elif buy == "n":
  2647. print(p1, "chose to ignore the property.")
  2648. #If player gives a response that is not "y" or "n"...
  2649. else:
  2650. print("Invalid response.")
  2651. #If Player One owns the property...
  2652. elif bl1 == 1:
  2653. print(p1, "stays a free night in their own property.")
  2654. #If Player Two owns the property...
  2655. elif bl1 == 2:
  2656. #If property is not mortgaged...
  2657. if bl1m == 0:
  2658. bl1r = 35
  2659. #If player owns a Monopoly over all colors of the property...
  2660. if bl2 == 2:
  2661. bl1r = 70
  2662. #If player has 1 house on property...
  2663. if bl1h == 1:
  2664. bl1r = 175
  2665. #If player has 2 houses on property...
  2666. elif bl1h == 2:
  2667. bl1r = 500
  2668. #If player has 3 houses on property...
  2669. elif bl1h == 3:
  2670. bl1r = 1100
  2671. #If player has 4 houses on property...
  2672. elif bl1h == 4:
  2673. bl1r = 1300
  2674. #If player has a hotel on property...
  2675. elif bl1h == 5:
  2676. bl1r = 1500
  2677. #If player does not own a Monopoly over all colors of the property...
  2678. elif bl2 != 2:
  2679. bl1r = 35
  2680. #Player One pays Player Two rent
  2681. print(p1, "pays", p2, "$" + str(bl1r) + "!")
  2682. p1m = p1m - bl1r
  2683. p2m = p2m + bl1r
  2684. #If property is mortgaged...
  2685. elif bl1m == 1:
  2686. print("Park Place is currently mortgaged.")
  2687.  
  2688. ############If player lands on Boardwalk...
  2689. if p1s == 39:
  2690. print()
  2691. #If property is unowned...
  2692. if bl2 == 0:
  2693. price = 400
  2694. #Checks to ensure y/n answer is given
  2695. while buy != "y" and buy != "n":
  2696. buy = input("Do you want to buy Boardwalk for $400? (y/n): ")
  2697. #If player wants to buy the property...
  2698. if buy == "y":
  2699. #Success!
  2700. if p1m >= 400:
  2701. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  2702. p1m = p1m - price
  2703. bl2 = 1
  2704. #Not enough money!
  2705. else:
  2706. print("Insufficient funds.")
  2707. #If player doesn't want to buy the property...
  2708. elif buy == "n":
  2709. print(p1, "chose to ignore the property.")
  2710. #If player gives a response that is not "y" or "n"...
  2711. else:
  2712. print("Invalid response.")
  2713. #If Player One owns the property...
  2714. elif bl2 == 1:
  2715. print(p1, "stays a free night in their own property.")
  2716. #If Player Two owns the property...
  2717. elif bl2 == 2:
  2718. #If property is not mortgaged...
  2719. if bl2m == 0:
  2720. bl2r = 50
  2721. #If player owns a Monopoly over all colors of the property...
  2722. if bl1 == 2:
  2723. bl2r = 100
  2724. #If player has 1 house on property...
  2725. if bl2h == 1:
  2726. bl2r = 200
  2727. #If player has 2 houses on property...
  2728. elif bl2h == 2:
  2729. bl2r = 600
  2730. #If player has 3 houses on property...
  2731. elif bl2h == 3:
  2732. bl2r = 1400
  2733. #If player has 4 houses on property...
  2734. elif bl2h == 4:
  2735. bl2r = 1700
  2736. #If player has a hotel on property...
  2737. elif bl2h == 5:
  2738. bl2r = 2000
  2739. #If player does not own a Monopoly over all colors of the property...
  2740. elif bl1 != 2:
  2741. bl2r = 50
  2742. #Player One pays Player Two rent
  2743. print(p1, "pays", p2, "$" + str(bl2r) + "!")
  2744. p1m = p1m - bl2r
  2745. p2m = p2m + bl2r
  2746. #If property is mortgaged...
  2747. elif bl2m == 1:
  2748. print("Boardwalk is currently mortgaged.")
  2749.  
  2750. ############If player lands on Reading Railroad...
  2751. if p1s == 5:
  2752. print()
  2753. #If property is unowned...
  2754. if rrr == 0:
  2755. price = 200
  2756. #Checks to ensure y/n answer is given
  2757. while buy != "y" and buy != "n":
  2758. buy = input("Do you want to buy Reading Railroad for $200? (y/n): ")
  2759. #If player wants to buy the property...
  2760. if buy == "y":
  2761. #Success!
  2762. if p1m >= 200:
  2763. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  2764. p1m = p1m - price
  2765. rrr = 1
  2766. p1rr = p1rr + 1
  2767. #Not enough money!
  2768. else:
  2769. print("Insufficient funds.")
  2770. #If player doesn't want to buy the property...
  2771. elif buy == "n":
  2772. print(p1, "chose to ignore the railroad.")
  2773. #If player gives a response that is not "y" or "n"...
  2774. else:
  2775. print("Invalid response.")
  2776. #If Player One owns the property...
  2777. elif rrr == 1:
  2778. print(p1, "admires their railroad.")
  2779. #If Player Two owns the property...
  2780. elif rrr == 2:
  2781. #If property is not mortgaged...
  2782. if rrrm == 0:
  2783. rrrr = 25
  2784. #If player owns a Monopoly over all colors of the property...
  2785. if p2rr == 2:
  2786. rrrr = 50
  2787. elif p2rr == 3:
  2788. rrrr = 100
  2789. elif p2rr == 4:
  2790. rrrr = 200
  2791. #Player One pays Player Two rent
  2792. print(p1, "pays", p2, "$" + str(rrrr) + "!")
  2793. p1m = p1m - rrrr
  2794. p2m = p2m + rrrr
  2795. #If property is mortgaged...
  2796. elif rrrm == 1:
  2797. print("Reading Railroad is currently mortgaged.")
  2798.  
  2799. ############If player lands on Pennsylvania Railroad...
  2800. if p1s == 15:
  2801. print()
  2802. #If property is unowned...
  2803. if prr == 0:
  2804. price = 200
  2805. #Checks to ensure y/n answer is given
  2806. while buy != "y" and buy != "n":
  2807. buy = input("Do you want to buy Pennsylvania Railroad for $200? (y/n): ")
  2808. #If player wants to buy the property...
  2809. if buy == "y":
  2810. #Success!
  2811. if p1m >= 200:
  2812. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  2813. p1m = p1m - price
  2814. prr = 1
  2815. p1rr = p1rr + 1
  2816. #Not enough money!
  2817. else:
  2818. print("Insufficient funds.")
  2819. #If player doesn't want to buy the property...
  2820. elif buy == "n":
  2821. print(p1, "chose to ignore the railroad.")
  2822. #If player gives a response that is not "y" or "n"...
  2823. else:
  2824. print("Invalid response.")
  2825. #If Player One owns the property...
  2826. elif prr == 1:
  2827. print(p1, "admires their railroad.")
  2828. #If Player Two owns the property...
  2829. elif prr == 2:
  2830. #If property is not mortgaged...
  2831. if prrm == 0:
  2832. prrr = 25
  2833. #If player owns a Monopoly over all colors of the property...
  2834. if p2rr == 2:
  2835. prrr = 50
  2836. elif p2rr == 3:
  2837. prrr = 100
  2838. elif p2rr == 4:
  2839. prrr = 200
  2840. #Player One pays Player Two rent
  2841. print(p1, "pays", p2, "$" + str(prrr) + "!")
  2842. p1m = p1m - prrr
  2843. p2m = p2m + prrr
  2844. #If property is mortgaged...
  2845. elif prrm == 1:
  2846. print("Pennsylvania Railroad is currently mortgaged.")
  2847.  
  2848. ############If player lands on B & O Railroad...
  2849. if p1s == 25:
  2850. print()
  2851. #If property is unowned...
  2852. if brr == 0:
  2853. price = 200
  2854. #Checks to ensure y/n answer is given
  2855. while buy != "y" and buy != "n":
  2856. buy = input("Do you want to buy B & O Railroad for $200? (y/n): ")
  2857. #If player wants to buy the property...
  2858. if buy == "y":
  2859. #Success!
  2860. if p1m >= 200:
  2861. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  2862. p1m = p1m - price
  2863. brr = 1
  2864. p1rr = p1rr + 1
  2865. #Not enough money!
  2866. else:
  2867. print("Insufficient funds.")
  2868. #If player doesn't want to buy the property...
  2869. elif buy == "n":
  2870. print(p1, "chose to ignore the railroad.")
  2871. #If player gives a response that is not "y" or "n"...
  2872. else:
  2873. print("Invalid response.")
  2874. #If Player One owns the property...
  2875. elif brr == 1:
  2876. print(p1, "admires their railroad.")
  2877. #If Player Two owns the property...
  2878. elif brr == 2:
  2879. #If property is not mortgaged...
  2880. if brrm == 0:
  2881. brrr = 25
  2882. #If player owns a Monopoly over all colors of the property...
  2883. if p2rr == 2:
  2884. brrr = 50
  2885. elif p2rr == 3:
  2886. brrr = 100
  2887. elif p2rr == 4:
  2888. brrr = 200
  2889. #Player One pays Player Two rent
  2890. print(p1, "pays", p2, "$" + str(brrr) + "!")
  2891. p1m = p1m - brrr
  2892. p2m = p2m + brrr
  2893. #If property is mortgaged...
  2894. elif brrm == 1:
  2895. print("B & O Railroad is currently mortgaged.")
  2896.  
  2897. ############If player lands on Short Line...
  2898. if p1s == 35:
  2899. print()
  2900. #If property is unowned...
  2901. if srr == 0:
  2902. price = 200
  2903. #Checks to ensure y/n answer is given
  2904. while buy != "y" and buy != "n":
  2905. buy = input("Do you want to buy Short Line for $200? (y/n): ")
  2906. #If player wants to buy the property...
  2907. if buy == "y":
  2908. #Success!
  2909. if p1m >= 200:
  2910. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  2911. p1m = p1m - price
  2912. srr = 1
  2913. p1rr = p1rr + 1
  2914. #Not enough money!
  2915. else:
  2916. print("Insufficient funds.")
  2917. #If player doesn't want to buy the property...
  2918. elif buy == "n":
  2919. print(p1, "chose to ignore the railroad.")
  2920. #If player gives a response that is not "y" or "n"...
  2921. else:
  2922. print("Invalid response.")
  2923. #If Player One owns the property...
  2924. elif srr == 1:
  2925. print(p1, "admires their railroad.")
  2926. #If Player Two owns the property...
  2927. elif srr == 2:
  2928. #If property is not mortgaged...
  2929. if srrm == 0:
  2930. srrr = 25
  2931. #If player owns a Monopoly over all colors of the property...
  2932. if p2rr == 2:
  2933. srrr = 50
  2934. elif p2rr == 3:
  2935. srrr = 100
  2936. elif p2rr == 4:
  2937. srrr = 200
  2938. #Player One pays Player Two rent
  2939. print(p1, "pays", p2, "$" + str(srrr) + "!")
  2940. p1m = p1m - srrr
  2941. p2m = p2m + srrr
  2942. #If property is mortgaged...
  2943. elif srrm == 1:
  2944. print("Short Line is currently mortgaged.")
  2945.  
  2946. ############If player lands on Electric Company...
  2947. if p1s == 12:
  2948. print()
  2949. #If property is unowned...
  2950. if ec == 0:
  2951. price = 150
  2952. #Checks to ensure y/n answer is given
  2953. while buy != "y" and buy != "n":
  2954. buy = input("Do you want to buy Electric Company for $150? (y/n): ")
  2955. #If player wants to buy the property...
  2956. if buy == "y":
  2957. #Success!
  2958. if p1m >= 150:
  2959. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  2960. p1m = p1m - price
  2961. ec = 1
  2962. p1u = p1u + 1
  2963. #Not enough money!
  2964. else:
  2965. print("Insufficient funds.")
  2966. #If player doesn't want to buy the property...
  2967. elif buy == "n":
  2968. print(p1, "chose to ignore the utility.")
  2969. #If player gives a response that is not "y" or "n"...
  2970. else:
  2971. print("Invalid response.")
  2972. #If Player One owns the property...
  2973. elif ec == 1:
  2974. print(p1, "admires their utility.")
  2975. #If Player Two owns the property...
  2976. elif ec == 2:
  2977. #If property is not mortgaged...
  2978. if ecm == 0:
  2979. ecr = ((die1 + die2) * 4)
  2980. #If both utilities are owned...
  2981. if p1u == 2:
  2982. ecr = ((die1 + die2) * 10)
  2983. #Player One pays Player Two rent
  2984. print(p1, "pays", p2, "$" + str(ecr) + "!")
  2985. p1m = p1m - ecr
  2986. p2m = p2m + ecr
  2987. #If property is mortgaged...
  2988. elif ecm == 1:
  2989. print("Electric Company is currently mortgaged.")
  2990.  
  2991. ############If player lands on Water Works...
  2992. if p1s == 28:
  2993. print()
  2994. #If property is unowned...
  2995. if ww == 0:
  2996. price = 150
  2997. #Checks to ensure y/n answer is given
  2998. while buy != "y" and buy != "n":
  2999. buy = input("Do you want to buy Water Works for $150? (y/n): ")
  3000. #If player wants to buy the property...
  3001. if buy == "y":
  3002. #Success!
  3003. if p1m >= 150:
  3004. print(p1, "bought", space[p1s], "for $" + str(price) + "!")
  3005. p1m = p1m - price
  3006. ww = 1
  3007. p1u = p1u + 1
  3008. #Not enough money!
  3009. else:
  3010. print("Insufficient funds.")
  3011. #If player doesn't want to buy the property...
  3012. elif buy == "n":
  3013. print(p1, "chose to ignore the utility.")
  3014. #If player gives a response that is not "y" or "n"...
  3015. else:
  3016. print("Invalid response.")
  3017. #If Player One owns the property...
  3018. elif ww == 1:
  3019. print(p1, "admires their utility.")
  3020. #If Player Two owns the property...
  3021. elif ww == 2:
  3022. #If property is not mortgaged...
  3023. if wwm == 0:
  3024. wwr = ((die1 + die2) * 4)
  3025. #If both utilities are owned...
  3026. if p1u == 2:
  3027. wwr = ((die1 + die2) * 10)
  3028. #Player One pays Player Two rent
  3029. print(p1, "pays", p2, "$" + str(wwr) + "!")
  3030. p1m = p1m - wwr
  3031. p2m = p2m + wwr
  3032. #If property is mortgaged...
  3033. elif wwm == 1:
  3034. print("Water Works is currently mortgaged.")
  3035.  
  3036. ############If player lands on Free Parking...
  3037. if p1s == 20:
  3038. print()
  3039. print(p1, "landed on Free Parking! You receive $" + str(fp) + "!")
  3040. p1m = p1m + fp
  3041. fp = 200
  3042.  
  3043. ############If player lands on Income Tax...
  3044. if p1s == 4:
  3045. if p1m >= 200:
  3046. p1m = p1m - 200
  3047. fp = fp + 200
  3048. print(p1, "paid off a $200 income tax.")
  3049. elif p1m < 200:
  3050. print(p1, "couly only afford to pay off $" + str(p1m), "of their income tax. Yikes.")
  3051. p1m = p1m - p1m
  3052. fp = fp + p1m
  3053.  
  3054. ############If player lands on Luxury Tax...
  3055. if p1s == 38:
  3056. if p1m >= 100:
  3057. p1m = p1m - 100
  3058. fp = fp + 100
  3059. print(p1, "paid off a $100 luxury tax.")
  3060. elif p1m < 100:
  3061. print(p1, "could only afford to pay off $" + str(p1m), "of their luxury tax. Yikes.")
  3062. p1m = p1m - p1m
  3063. fp = fp + p1m
  3064.  
  3065. ############If player lands on Jail...
  3066. if p1s == 30:
  3067. p1j = 1
  3068. for i in range(20):
  3069. if p1s < 40:
  3070. if p1x > -333 and p1y == -335:
  3071. if p1s == 0 or p1s == 9:
  3072. p1x = p1x - 82
  3073. else:
  3074. p1x = p1x - 63
  3075. elif p1x == -333 and p1y < 333:
  3076. if p1s == 10 or p1s == 19:
  3077. p1y = p1y + 82
  3078. else:
  3079. p1y = p1y + 63
  3080. elif p1x < 335 and p1y == 333:
  3081. if p1s == 20 or p1s == 29:
  3082. p1x = p1x + 82
  3083. else:
  3084. p1x = p1x + 63
  3085. elif p1x == 335 and p1y > -335:
  3086. if p1s == 30 or p1s == 39:
  3087. p1y = p1y - 82
  3088. else:
  3089. p1y = p1y - 63
  3090. #Sets player position on board
  3091. player1.setpos(p1x, p1y)
  3092. #Increases space player resides on
  3093. p1s = p1s + 1
  3094. #Resets player 1 space count to 0 when passing 39
  3095. if p1s == 40:
  3096. p1s = 0
  3097.  
  3098.  
  3099. #Resets the "buy" variable
  3100. buy = "x"
  3101. #if die1 == die2:
  3102. #turn = 1
  3103. #elif die1 != die2:
  3104. #turn = 2
  3105.  
  3106. ############Signifies end of Player One's turn
  3107. input("---------------------------------------------------------")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement