var yes: string
var no: string
var ansuer: string
var x, y : int
setscreen ("graphics: 450;225")
Pic.ScreenLoad ("title.bmp", 100, 0, picCopy)
delay (3000)
%Variables
var cheak : array 1 .. 3, 1 .. 3 of string (1)
var b : int
% initialize grid
for row : 1 .. 3
for column : 1 .. 3
cheak (row, column) := "-"
end for
end for
% Draw the x and o grid
setscreen ("graphics: 300;300")
drawline (0, 100, 300, 100, black)
drawline (0, 200, 300, 200, black)
drawline (100, 0, 100, 300, black)
drawline (200, 0, 200, 300, black)
drawline (101, 0, 101, 300, black)
drawline (201, 0, 201, 300, black)
drawline (301, 201, 0, 201, black)
drawline (0, 101, 301, 101, black)
drawbox (0, 299, 299, 0, black)
loop
loop
mousewhere (x, y, b)
if b = 1 then
if x > 0 and x < 100 and y > 0 and y < 100 then
Pic.ScreenLoad ("work.bmp", 0, 0, picCopy)
elsif x > 100 and x < 200 and y > 0 and y < 100 then
Pic.ScreenLoad ("work.bmp", 100, 0, picCopy)
elsif x > 200 and x < 300 and y > 0 and y < 100 then
Pic.ScreenLoad ("work.bmp", 200, 0, picCopy)
elsif x > 0 and x < 100 and y > 100 and y < 200 then
Pic.ScreenLoad ("work.bmp", 0, 100, picCopy)
elsif x > 100 and x < 200 and y > 100 and y < 200 then
Pic.ScreenLoad ("work.bmp", 100, 100, picCopy)
elsif x > 200 and x < 300 and y > 100 and y < 200 then
Pic.ScreenLoad ("work.bmp", 200, 100, picCopy)
elsif x > 0 and x < 100 and y > 200 and y < 300 then
Pic.ScreenLoad ("work.bmp", 0, 200, picCopy)
elsif x > 100 and x < 200 and y > 200 and y < 300 then
Pic.ScreenLoad ("work.bmp", 100, 200, picCopy)
elsif x > 200 and x < 300 and y > 200 and y < 300 then
Pic.ScreenLoad ("work.bmp", 200, 200, picCopy)
end if
end if
exit when b = 1
end loop
delay (1000)
loop
randint (x, 0, 300)
randint (y, 0, 300)
if x > 0 and x < 100 and y > 0 and y < 100 then
Pic.ScreenLoad ("work2.bmp", 0, 0, picCopy)
elsif x > 100 and x < 200 and y > 0 and y < 100 then
Pic.ScreenLoad ("work2.bmp", 100, 0, picCopy)
elsif x > 200 and x < 300 and y > 0 and y < 100 then
Pic.ScreenLoad ("work2.bmp", 200, 0, picCopy)
elsif x > 0 and x < 100 and y > 100 and y < 200 then
Pic.ScreenLoad ("work2.bmp", 0, 100, picCopy)
elsif x > 100 and x < 200 and y > 100 and y < 200 then
Pic.ScreenLoad ("work2.bmp", 100, 100, picCopy)
elsif x > 200 and x < 300 and y > 100 and y < 200 then
Pic.ScreenLoad ("work2.bmp", 200, 100, picCopy)
elsif x > 0 and x < 100 and y > 200 and y < 300 then
Pic.ScreenLoad ("work2.bmp", 0, 200, picCopy)
elsif x > 100 and x < 200 and y > 200 and y < 300 then
Pic.ScreenLoad ("work2.bmp", 100, 200, picCopy)
elsif x > 200 and x < 300 and y > 200 and y < 300 then
Pic.ScreenLoad ("work2.bmp", 200, 200, picCopy)
end if
exit
end loop
end loop
end if
_________________________________________________________________ |