home *** CD-ROM | disk | FTP | other *** search
-
-
-
- #include "mono:defines" /* has all #includes & #defines */
- #include "mono:variables" /* has all global variables */
-
-
- main()
- {
- struct FileHandle *file;
-
- IFFP iffp = NO_FILE;
-
- srand(time(NULL)); /* randomize using current time */
- isinjail[0]=isinjail[1]=isinjail[2]=isinjail[3]=FALSE;/* no one IN JAIL */
- free_parking=FALSE; /* default to standard rule */
- bankroll[0]=bankroll[1]=bankroll[2]=bankroll[3]=1500L; /* $1500 to start */
- bankroll[4]=0L;
- bankroll[5]=999999L;
- building=mortgaging=FALSE;
-
-
- if(!(GfxBase=(struct GfxBase *)OpenLibrary("graphics.library",GRAPHICS_REV)))
- cleanexit("Can't open graphics library\n");
-
- if(!(IntuitionBase=
- (struct IntuitionBase *)OpenLibrary("intuition.library",INTUITION_REV)))
- cleanexit("Can't open graphics library\n");
-
- shuffle(0);
- shuffle(1);
- fillattr();
- fill_instruct_text();
-
- if (file = Open(&picture_file[0], MODE_OLDFILE))
- {
- iffp = ReadPicture(file);
- Close(file);
- if (iffp == IFF_DONE)
- {
- error = DisplayPic(&ilbmFrame);
- if(error) cleanexit("Can't open screen or window\n");
- Delay(150); /* SHOW BOARD AS INTRO ART */
- getplayerinfo();
- nsp=ntp;
- (VOID) random_start();
- makemenu();
- SetMenuStrip(boardwindow, &Menu0);
- OffMenu(boardwindow, 35); /* M3I1S0 jail */
- OffMenu(boardwindow, 67); /* M3I2S0 " */
- OffMenu(boardwindow, 99); /* M3I3S0 " */
-
- fixmenu();
- cname.BackPen=0;
- cname.DrawMode=JAM1;
- cname.LeftEdge=5;
- cname.TopEdge=8;
- cname.ITextFont=NULL;
- cname.NextText=NULL;
- cname.FrontPen=25;
- cname.IText=&name0[0];
- writeyourturn();
-
- if (ntp == 2)
- {
- notplaying[0]=FALSE;
- notplaying[1]=FALSE;
- notplaying[2]=TRUE;
- notplaying[3]=TRUE;
- }
- if (ntp == 3)
- {
- notplaying[0]=FALSE;
- notplaying[1]=FALSE;
- notplaying[2]=FALSE;
- notplaying[3]=TRUE;
- }
- if (ntp == 4)
- {
- notplaying[0]=FALSE;
- notplaying[1]=FALSE;
- notplaying[2]=FALSE;
- notplaying[3]=FALSE;
- }
- bob();
- REDX= go[0][0];
- REDY= go[1][0];
- GREENX= go[0][1];
- GREENY= go[1][1];
- if ((ntp == 3) || (ntp ==4))
- {
- BLUEX= go[0][2];
- BLUEY= go[1][2];
- }
- if (ntp == 4)
- {
- YELLOWX=go[0][3];
- YELLOWY=go[1][3];
- }
- WaitTOF();
- DrawGels();
-
- done = FALSE; /* Close flag */
- while (!done)
- {
- if (1<<boardwindow->UserPort->mp_SigBit) ckmanemsg();
- }
-
-
- printf("FINAL TOTALS:\n");
- ahead();
- if (!notplaying[0]) printf("%s had %ld\n", &name0, net_worth[0]);
- if (!notplaying[1]) printf("%s had %ld\n", &name1, net_worth[1]);
- if (!notplaying[2]) printf("%s had %ld\n", &name2, net_worth[2]);
- if (!notplaying[3]) printf("%s had %ld\n", &name3, net_worth[3]);
- if (ahead() == 0) printf("%s wins with %ld\n", &name0, net_worth[0]);
- if (ahead() == 1) printf("%s wins with %ld\n", &name1, net_worth[1]);
- if (ahead() == 2) printf("%s wins with %ld\n", &name2, net_worth[2]);
- if (ahead() == 3) printf("%s wins with %ld\n", &name3, net_worth[3]);
- if (ahead() == 5) printf("no one wins -- TIE\n");
- }
- else cleanexit(IFFPMessages[-iffp]);
- }
- else cleanexit("Picture file not found.\n");
-
- cleanup();
- return(0);
- } /* end of main() */
-
-
-
-