procedure TfrmMapMv.sgMapDrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState); var i,j:integer; begin
if(map[ACol,ARow]=-1)then begin
sgMap.Canvas.Brush.Color:=clred;
sgMap.Canvas.FillRect(Rect); end; if(map[ACol,ARow]=0)then begin
sgMap.Canvas.Brush.Color:=clgreen;
sgMap.Canvas.FillRect(Rect); end; if(map[ACol,ARow]=2)then begin
sgMap.Canvas.Brush.Color:=clblue;
sgMap.Canvas.FillRect(Rect); end;