Program Carti; Uses CRT, Graph, Carts; var gd, gm: integer; c: TCarte; i: integer; BEGIN gd := DETECT; InitGraph(gd, gm, ''); if GRaphResult <> grOk then begin writeln('Eroare initializare mod grafic!'); readkey; Exit; end; SetBkColor(8); SetColor(YELLOW); randomize; c_width := 100; {latimea cartii} c_height := c_width * 3 div 2; {inaltimea cartii} c_style := 9; {fundalul cartii (1..11)} c_text_size := 2; {dimensiunea textului cartii (1..4)} { I mod de desenare, folosind DrowCarte(c: TCarte; x, y: integer); } c_style := 9; {6} c.nume := 'T'; {numele cartii c} c.maste := c_inima; {masta cartii c} DrowCarte(c, 10, 10); c.maste := c_frunza; DrowCarte(c, 10+1*(c_width+10), 10); c.maste := c_romb; DrowCarte(c, 10+2*(c_width+10), 10); c.maste := c_canabis; DrowCarte(c, 10+3*(c_width+10), 10); { Al II-lea mod de desenare, folosind DrowCart(n: TNumeCarte; m: TMaste; x, y: integer) } for i := 1 to 9 do begin c_style := i; DrowCart(chr(i+ord('0')), i mod 4, i*30, 10+12*i+c_height); end; inc(i); inc(c_style); DrowCart('10', i mod 4, i*30, 10+12*i+c_height); inc(i); c_style_verso := 10; DrowCart('1', 4, i*30, 10+12*i+c_height); {Pauza} readkey; CloseGraph; END.