Язык:
Русский
English
{ Пример программы для функций GetMaxColor и SetColor }
uses Crt, Graph;
var
GraphDriver, GraphMode : Integer;
begin
GraphDriver := Detect;
InitGraph(GraphDriver, GraphMode, 'X:\BP');
if GraphResult <> grOk then
Halt(1);
Randomize;
repeat
SetColor(Random(GetMaxColor) + 1);
LineTo(Random(GetMaxX), Random(GetMaxY));
until KeyPressed;
end.
var
GraphDriver, GraphMode : Integer;
begin
GraphDriver := Detect;
InitGraph(GraphDriver, GraphMode, 'X:\BP');
if GraphResult <> grOk then
Halt(1);
Randomize;
repeat
SetColor(Random(GetMaxColor) + 1);
LineTo(Random(GetMaxX), Random(GetMaxY));
until KeyPressed;
end.