
-----------------------------------
Jaxter
Tue May 04, 2004 12:43 pm

How do u add a border to a raceway...please read...
-----------------------------------
This is a game that me and my partner made for a school project...

%ID SECTION
%Janet Mak and Jacky Yoh
%Eight Racing Game 
%DUE : MAY 7, 2004
%An eight way race track, with 2 cars, 
%one control by cursor keys (ascii), another by the mouse 
%slows down when they hit the wall or each other
%Original site: http://www.compsci.ca/v2/viewtopic.php?t=2173

%DECALARATION
var racer1, racer2, speed1, speed2, wager, credits, win, startcredits : int 
% racer1/racer2: Represents the posistion of the racers 
% speed1/speed2: Represents the speed of the two racers 
% wager: Repesents the user's wager 
% credits: Represents the amount of credits the user has 
% win: Represents wether you have won, lost, or had a tie 
% startcredits: Represents the amount of starting credits 

var continue, restart, guess : string 
% continue: Represents the users choice to race again 
% restart: Represents the user choice to start over, if he/she has ran out of money 
% guess: Represents the guess of the user 

var next : char % Represents the user input of any key, to move to the next screen 

const midx := maxx div 2
const midy := maxy div 2

var x, y, button : int

var font1, font2, font3, font4, font5, font6 : int


%INITIALIZATION

wager := 0 
font1 := Font.New ("Comic Sans MS:20:bold")
font2 := Font.New ("Palatino:30:bold,italic")
font3 := Font.New ("Comic Sans MS:30:bold")
font4 := Font.New ("Georgia:16")
font5 := Font.New ("Lucida Bright:55:bold,italic")
font6 := Font.New ("Lucida Bright:80:bold,italic")
assert font1 > 0
assert font2 > 0
assert font3 > 0
assert font4 > 0
assert font5 > 0
assert font6 > 0

%PROGRAM SECTION
%Introduction 

setscreen ("graphics")
colorback (7)
color (0)
drawfillbox (0, 0, maxx, maxy, 7)

Font.Draw ("Welcome  " , 1, 300, font1, 46)
delay (500)
Font.Draw ("          to  " , 1, 300, font1, 47)
delay (500)
Font.Draw ("               Janet  " , 1, 300, font2, 83)
delay (500)
Font.Draw ("                       and " , 1, 300, font1, 46)
delay (500)
Font.Draw ("                              Jacky's " , 1, 300, font2, 32)
delay (500)
Font.Draw ("                Raceway!!! ... " , 1, 200, font2, 41)
delay (500)

cls

Font.Draw ("Janet and Jacky's Raceway" , 60, 320, font3, 79)
Font.Draw ("Choose the amount of starting credits you want." , 1, 280, font4, 29)
Font.Draw ("You will be biding on one of the two cars, red or blue." , 1, 260, font4, 29)
Font.Draw ("Choose the car you think will win." , 1, 240, font4, 29)
Font.Draw ("Then place a bet on your car." , 1, 220, font4, 29)
Font.Draw ("If you win, you will get your wager back," , 1, 200, font4, 29)
Font.Draw ("plus double your wager on top of it!" , 1, 180, font4, 39)
Font.Draw ("Press any key to begin." , 1, 160, font4, 29)
next := getchar 

cls 
 


%Start Credits 

loop 

    Font.Draw ("How many credit(s) would you like to start with? (1-1000)" , 1, 200, font4, 96)
    
    get startcredits 

    if (startcredits >= 1) and (startcredits  0 and wager maxx or xmaxy or y