var winID : int := Window.Open ("position:0;100, graphics:1000;650")
proc graphic
drawfillbox (0, 0, 1000, 630, 16)
colour (0)
colourback (16)
end graphic
proc title
graphic
var font : int
font := Font.New ("Comic Sans MS:16:Bold")
Draw.Text ("PACMAN", 450, 600, font, brightblue)
end title
setscreen ("nocursor")
var key : string (1)
proc level1
title
%OutSide Wall
Draw.ThickLine (20, 20, 980, 20, 10, brightblue)
Draw.ThickLine (20, 20, 20, 580, 10, brightblue)
Draw.ThickLine (20, 580, 980, 580, 10, brightblue)
Draw.ThickLine (980, 580, 980, 20, 10, brightblue)
% Left Pattern
Draw.ThickLine (70, 70, 70, 285, 7, brightblue)
Draw.ThickLine (70, 335, 70, 530, 7, brightblue)
Draw.ThickLine (70, 335, 100, 335, 7, brightblue)
Draw.ThickLine (100, 335, 100, 500, 7, brightblue)
Draw.ThickLine (70, 285, 100, 285, 7, brightblue)
Draw.ThickLine (100, 285, 100, 100, 7, brightblue)
Draw.ThickLine (100, 100, 200, 100, 7, brightblue)
Draw.ThickLine (200, 100, 200, 70, 7, brightblue)
Draw.ThickLine (200, 70, 70, 70, 7, brightblue)
Draw.ThickLine (100, 500, 200, 500, 7, brightblue)
Draw.ThickLine (200, 530, 200, 500, 7, brightblue)
Draw.ThickLine (200, 530, 70, 530, 7, brightblue)
% Middle Box
Draw.ThickLine (425, 240, 425, 370, 10, red)
Draw.ThickLine (575, 240, 575, 370, 10, red)
Draw.ThickLine (425, 370, 575, 370, 10, red)
Draw.ThickLine (425, 240, 575, 240, 10, red)
% Interior upper left pattern
Draw.ThickLine (375, 420, 375, 500, 7, brightblue)
Draw.ThickLine (345, 420, 345, 500, 7, brightblue)
Draw.ThickLine (345, 420, 375, 420, 7, brightblue)
Draw.ThickLine (475, 530, 250, 530, 7, brightblue)
Draw.ThickLine (250, 530, 250, 500, 7, brightblue)
Draw.ThickLine (250, 500, 345, 500, 7, brightblue)
Draw.ThickLine (375, 500, 475, 500, 7, brightblue)
Draw.ThickLine (475, 530, 475, 500, 7, brightblue)
% Interior upper right pattern
Draw.ThickLine (650, 420, 650, 500, 7, brightblue)
Draw.ThickLine (620, 420, 620, 500, 7, brightblue)
Draw.ThickLine (620, 420, 650, 420, 7, brightblue)
Draw.ThickLine (750, 530, 525, 530, 7, brightblue)
Draw.ThickLine (525, 530, 525, 500, 7, brightblue)
Draw.ThickLine (525, 500, 620, 500, 7, brightblue)
Draw.ThickLine (650, 500, 750, 500, 7, brightblue)
Draw.ThickLine (750, 530, 750, 500, 7, brightblue)
% Interior upper left pattern
Draw.ThickLine (150, 335, 150, 450, 7, brightblue)
Draw.ThickLine (295, 335, 295, 450, 7, brightblue)
Draw.ThickLine (295, 335, 150, 335, 7, brightblue)
Draw.ThickLine (295, 450, 150, 450, 7, brightblue)
% Middle Left Pattern (Left of Red Box)
Draw.ThickLine (345, 370, 375, 370, 7, brightblue)
Draw.ThickLine (345, 370, 345, 240, 7, brightblue)
Draw.ThickLine (375, 370, 375, 240, 7, brightblue)
Draw.ThickLine (345, 240, 375, 240, 7, brightblue)
% Interior lower left pattern
Draw.ThickLine (150, 285, 150, 150, 7, brightblue)
Draw.ThickLine (150, 150, 295, 150, 7, brightblue)
Draw.ThickLine (295, 285, 295, 150, 7, brightblue)
Draw.ThickLine (150, 285, 295, 285, 7, brightblue)
% Interior lower left pattern
Draw.ThickLine (375, 190, 375, 100, 7, brightblue)
Draw.ThickLine (345, 190, 345, 100, 7, brightblue)
Draw.ThickLine (345, 190, 375, 190, 7, brightblue)
Draw.ThickLine (475, 70, 250, 70, 7, brightblue)
Draw.ThickLine (250, 100, 250, 70, 7, brightblue)
Draw.ThickLine (250, 100, 345, 100, 7, brightblue)
Draw.ThickLine (375, 100, 475, 100, 7, brightblue)
Draw.ThickLine (475, 70, 475, 100, 7, brightblue)
% Interior lower right pattern
Draw.ThickLine (650, 190, 650, 100, 7, brightblue)
Draw.ThickLine (620, 190, 620, 100, 7, brightblue)
Draw.ThickLine (620, 190, 650, 190, 7, brightblue)
Draw.ThickLine (750, 70, 525, 70, 7, brightblue)
Draw.ThickLine (525, 100, 525, 70, 7, brightblue)
Draw.ThickLine (525, 100, 620, 100, 7, brightblue)
Draw.ThickLine (650, 100, 750, 100, 7, brightblue)
Draw.ThickLine (750, 70, 750, 100, 7, brightblue)
% Middle Right Pattern (Right of Red Box)
Draw.ThickLine (620, 370, 650, 370, 7, brightblue)
Draw.ThickLine (620, 370, 620, 240, 7, brightblue)
Draw.ThickLine (650, 370, 650, 240, 7, brightblue)
Draw.ThickLine (620, 240, 650, 240, 7, brightblue)
% Interior upper right pattern
Draw.ThickLine (700, 335, 700, 450, 7, brightblue)
Draw.ThickLine (845, 335, 845, 450, 7, brightblue)
Draw.ThickLine (845, 335, 700, 335, 7, brightblue)
Draw.ThickLine (845, 450, 700, 450, 7, brightblue)
% Interior lower right pattern
Draw.ThickLine (700, 285, 700, 150, 7, brightblue)
Draw.ThickLine (700, 150, 845, 150, 7, brightblue)
Draw.ThickLine (845, 285, 845, 150, 7, brightblue)
Draw.ThickLine (700, 285, 845, 285, 7, brightblue)
% Right Upper Pattern
Draw.ThickLine (930, 335, 930, 530, 7, brightblue)
Draw.ThickLine (930, 530, 800, 530, 7, brightblue)
Draw.ThickLine (930, 335, 900, 335, 7, brightblue)
Draw.ThickLine (900, 335, 900, 500, 7, brightblue)
Draw.ThickLine (900, 500, 800, 500, 7, brightblue)
Draw.ThickLine (800, 530, 800, 500, 7, brightblue)
% Right Lower Pattern
Draw.ThickLine (930, 70, 930, 285, 7, brightblue)
Draw.ThickLine (800, 100, 800, 70, 7, brightblue)
Draw.ThickLine (930, 285, 900, 285, 7, brightblue)
Draw.ThickLine (930, 70, 800, 70, 7, brightblue)
Draw.ThickLine (900, 285, 900, 100, 7, brightblue)
Draw.ThickLine (900, 100, 800, 100, 7, brightblue)
% Middle Lower Pattern
Draw.ThickLine (425, 190, 570, 190, 7, brightblue)
Draw.ThickLine (570, 190, 570, 150, 7, brightblue)
Draw.ThickLine (570, 150, 425, 150, 7, brightblue)
Draw.ThickLine (425, 190, 425, 150, 7, brightblue)
% Middle Upper Pattern
Draw.ThickLine (425, 420, 570, 420, 7, brightblue)
Draw.ThickLine (570, 420, 570, 450, 7, brightblue)
Draw.ThickLine (570, 450, 425, 450, 7, brightblue)
Draw.ThickLine (425, 420, 425, 450, 7, brightblue)
var key : string (1)
var column, row : int
column := 45
row := 45
drawfilloval (column, row, 15, 15, 14)
drawfilloval (column - 5, row + 8, 3, 3, brightred)
drawfilloval (column + 5, row + 8, 3, 3, brightred)
drawfilloval (column, row - 5, 10, 1, 16)
loop
getch (key)
if key = KEY_UP_ARROW then
drawfilloval (column, row, 15, 15, 16)
row := row + 10
elsif key = KEY_DOWN_ARROW then
drawfilloval (column, row, 15, 15, 16)
row := row - 10
elsif key = KEY_RIGHT_ARROW then
drawfilloval (column, row, 15, 15, 16)
column := column + 10
else
if key = KEY_LEFT_ARROW then
drawfilloval (column, row, 15, 15, 16)
column := column - 10
end if
end if
drawfilloval (column, row, 15, 15, 14)
drawfilloval (column - 5, row + 8, 3, 3, brightred)
drawfilloval (column + 5, row + 8, 3, 3, brightred)
drawfilloval (column, row - 5, 10, 1, 16)
end loop
end level1
loop
level1
exit when key = (KEY_ESC)
end loop
|