Brian Candler wrote:
> Teodor Carstea wrote:
>> ok, now I need to make it "alive". In C/C++ I can, but in Ruby, I have 
>> no idea.
> 
> What library did you use in C/C++ to draw the graphics? You may find 
> that there's a Ruby binding to the same library, so you won't have to 
> learn a new API.

well, take a look, it's a bit of code I needed to use to initialize 
graphics mode(I've used Borland 3):

0   #include <stdio.h>
1   #include <conio.h>
2   #include <stdlib.h>
3   #include <graphics.h>
4   int main(){
5      //initializing graphics mode
6      int gdriver=DETECT, gmode, errorcode;
7      initgraph(&gdriver, &gmode, "C:\\Progra~1\\BORLANDC\\BGI");
8      errorcode = graphresult();
9      if(errorcode!=grOk) {
10         cout<<"Graphics error!!!\n"
11             <<"Press any key...";
12         getch();
13         exit(1);
14     }
15  /*
16  AND HERE IS BLA-BLA-BLA CODE OF MY PROGRAM(let's say: a square   on 
the  17  screen, which changes its color, every time you hit "Enter")
18  */
19  return 0;
20  }

actually, I kannot comment the code between lines 6 and 14. I just knew 
I had to insert it into my main code and add #include<graphics.h> and my 
program will work. I thought there is smth like that in Ruby, and I have 
just to insert it into my code, look the posts above....
-- 
Posted via http://www.ruby-forum.com/.