
-----------------------------------
Rich0591
Fri Nov 17, 2006 6:00 pm

Problems with Connect 4 (Grade 10 level)
-----------------------------------
So Im having some big problems with my connect 4 game. I asked my teacher for help but she is taking way too long and its been over due. Could someone nice help me: make it so the game lets players take turns, reognize that 4 in a row means win (not diagonal, then my teacher will know I asked for help) and maybe make the circles fall from the top. I know its alot but I would really appreciate it if comeone could help me out. Also, if someone was to do it, could you do it at a simpler level?  Thanks! Heres the program:

%Connect 4%
%Large Program%

setscreen ("graphics:vga")
procedure gui
    drawfillbox (10, 10, maxx - 10, maxy - 10, 14)
    drawbox (10, 10, maxx - 10, maxy - 10, 16)
    %draws game outline
    drawline (98, 10, 98, maxy - 10, 16)
    drawline (186, 10, 186, maxy - 10, 16)
    drawline (274, 10, 274, maxy - 10, 16)
    drawline (362, 10, 362, maxy - 10, 16)
    drawline (450, 10, 450, maxy - 10, 16)
    drawline (538, 10, 538, maxy - 10, 16)
    %draws the 7 columns required for game
    drawfilloval (55, 39, 25, 25, white)
    drawfilloval (55, 94, 25, 25, white)
    drawfilloval (55, 150, 25, 25, white)
    drawfilloval (55, 205, 25, 25, white)
    drawfilloval (55, 260, 25, 25, white)
    drawfilloval (55, 315, 25, 25, white)
    %fills the first column with white circles
    drawoval (55, 39, 25, 25, 16)
    drawoval (55, 94, 25, 25, 16)
    drawoval (55, 150, 25, 25, 16)
    drawoval (55, 205, 25, 25, 16)
    drawoval (55, 260, 25, 25, 16)
    drawoval (55, 315, 25, 25, 16)
    %outlines the circles in black in first column
    drawfilloval (145, 39, 25, 25, white)
    drawfilloval (145, 94, 25, 25, white)
    drawfilloval (145, 150, 25, 25, white)
    drawfilloval (145, 205, 25, 25, white)
    drawfilloval (145, 260, 25, 25, white)
    drawfilloval (145, 315, 25, 25, white)
    %fills second column with white circles
    drawoval (145, 39, 25, 25, 16)
    drawoval (145, 94, 25, 25, 16)
    drawoval (145, 150, 25, 25, 16)
    drawoval (145, 205, 25, 25, 16)
    drawoval (145, 260, 25, 25, 16)
    drawoval (145, 315, 25, 25, 16)
    %outlines the circles in black in second column
    drawfilloval (235, 39, 25, 25, white)
    drawfilloval (235, 94, 25, 25, white)
    drawfilloval (235, 150, 25, 25, white)
    drawfilloval (235, 205, 25, 25, white)
    drawfilloval (235, 260, 25, 25, white)
    drawfilloval (235, 315, 25, 25, white)
    %fills the third column with white circles
    drawoval (235, 39, 25, 25, 16)
    drawoval (235, 94, 25, 25, 16)
    drawoval (235, 150, 25, 25, 16)
    drawoval (235, 205, 25, 25, 16)
    drawoval (235, 260, 25, 25, 16)
    drawoval (235, 315, 25, 25, 16)
    %outlines the circles in black in third column
    drawfilloval (320, 39, 25, 25, white)
    drawfilloval (320, 94, 25, 25, white)
    drawfilloval (320, 150, 25, 25, white)
    drawfilloval (320, 205, 25, 25, white)
    drawfilloval (320, 260, 25, 25, white)
    drawfilloval (320, 315, 25, 25, white)
    %fills the fourth column with white circles
    drawoval (320, 39, 25, 25, 16)
    drawoval (320, 94, 25, 25, 16)
    drawoval (320, 150, 25, 25, 16)
    drawoval (320, 205, 25, 25, 16)
    drawoval (320, 260, 25, 25, 16)
    drawoval (320, 315, 25, 25, 16)
    %outlines the circles in black in fourth column
    drawfilloval (410, 39, 25, 25, white)
    drawfilloval (410, 94, 25, 25, white)
    drawfilloval (410, 150, 25, 25, white)
    drawfilloval (410, 205, 25, 25, white)
    drawfilloval (410, 260, 25, 25, white)
    drawfilloval (410, 315, 25, 25, white)
    %fills the fifth column with white circles
    drawoval (410, 39, 25, 25, 16)
    drawoval (410, 94, 25, 25, 16)
    drawoval (410, 150, 25, 25, 16)
    drawoval (410, 205, 25, 25, 16)
    drawoval (410, 260, 25, 25, 16)
    drawoval (410, 315, 25, 25, 16)
    %outlines the circles in black in fifth column
    drawfilloval (500, 39, 25, 25, white)
    drawfilloval (500, 94, 25, 25, white)
    drawfilloval (500, 150, 25, 25, white)
    drawfilloval (500, 205, 25, 25, white)
    drawfilloval (500, 260, 25, 25, white)
    drawfilloval (500, 315, 25, 25, white)
    %fills the sixth column with white circles%
    drawoval (500, 39, 25, 25, 16)
    drawoval (500, 94, 25, 25, 16)
    drawoval (500, 150, 25, 25, 16)
    drawoval (500, 205, 25, 25, 16)
    drawoval (500, 260, 25, 25, 16)
    drawoval (500, 315, 25, 25, 16)
    %outlines the circles in black in sixth column%
    drawfilloval (590, 39, 25, 25, white)
    drawfilloval (590, 94, 25, 25, white)
    drawfilloval (590, 150, 25, 25, white)
    drawfilloval (590, 205, 25, 25, white)
    drawfilloval (590, 260, 25, 25, white)
    drawfilloval (590, 315, 25, 25, white)
    %fills the seventh column with white circles%
    drawoval (590, 39, 25, 25, 16)
    drawoval (590, 94, 25, 25, 16)
    drawoval (590, 150, 25, 25, 16)
    drawoval (590, 205, 25, 25, 16)
    drawoval (590, 260, 25, 25, 16)
    drawoval (590, 315, 25, 25, 16)
    %outlines the circles in black in seventh column%
end gui
var x, y, button : int
var player : int
gui
 player := 12
loop
   
    mousewhere (x, y, button)
    if button = 1 and 30 