fb:porticula NoPaste
Schachbrett zeichnen
Uploader: | MilkFreeze |
Datum/Zeit: | 18.12.2011 14:07:11 |
const tile_size = 48
const field_size = 8*tile_size
screenres field_size+240,field_size+32,32
dim switch as integer = 1
paint(1,1), &h999998
line(8,8)-(24+field_size,8), &hAB4500
line(8,24+field_size)-(24+field_size,24+field_size), &hAB4500
line(8,8)-(8,24+field_size), &hAB4500
line(24+field_size,8)-(24+field_size,24+field_size), &hAB4500
paint(9,9),&h9A3400,&hAB4500
for x as integer = 0 to 8
line (x*tile_size+16,16)-(x*tile_size+16,field_size+16),&h999999
next
for y as integer = 0 to 8
line (16,y*tile_size+16)-(field_size+16,y*tile_size+16),&h999999
next
for i as integer = 1 to 8
for j as integer = 1 to 8
if (switch = 1) then
paint (16+tile_size*i-1,16+tile_size*j-1), RGB(255,255,255),&h999999
switch = 0
else
paint(16+tile_size*i-1,16+tile_size*j-1), RGB(0,0,0),&h999999
switch = 1
end if
next
if (switch = 1) then
switch = 0
else
switch = 1
end if
next
for i as integer = 1 to 8
draw string (16+(i-1)*tile_size+(tile_size/2-4),8), chr(asc("A")+i-1)
next
for j as integer = 1 to 8
draw string (9,16+(j-1)*tile_size+(tile_size/2-4)), str(9-j)
next
sleep