|
Game of life in allegro |
francisco diogo
Member #8,229
January 2007
|
HI. I have made a simulation of the game of life in C, but I wanted to make it in Allegro language. |
CursedTyrant
Member #7,080
April 2006
|
I'll post what I can, based on the info you posted (just the drawing bit, tough it's not tested and can be buggy like hell):
--------- |
francisco diogo
Member #8,229
January 2007
|
Well, the program wasn't very buggy, but i tried to run it two times and both of them the windows said there was an error and the window had to close. Anyway thanks for your post. int main() board_init(); for(h=1; h <= MAX_GEN; h++) { for (i=0; i<=N; i++) { c = getchar(); |
CursedTyrant
Member #7,080
April 2006
|
Yes, well... I did put //init and such in the code since I thought you knew how to init all the allegro stuff. allegro_init(); set_color_depth(desktop_color_depth()); set_gfx_mode(GFX_AUTODETECT_WINDOWED, 800, 600, 0, 0); install_keyboard();
--------- |
GullRaDriel
Member #3,861
September 2003
|
Since when allegro is a language ? I always thought it was a library :p Edited "Code is like shit - it only smells if it is not yours" |
Jonatan Hedborg
Member #4,886
July 2004
|
COUNTER NITPICK ATTACK FOR MASSIVE DAMAGE!
|
LennyLen
Member #5,313
December 2004
|
Quote: tough = thought Super Nitpick Combo Breaker: tough != thought.
|
Jonatan Hedborg
Member #4,886
July 2004
|
There is no defense
|
GullRaDriel
Member #3,861
September 2003
|
No need to defend when I see no attack :p "Code is like shit - it only smells if it is not yours" |
LennyLen
Member #5,313
December 2004
|
Quote: No need to defend when I see no attack It appears you need glasses.
|
GullRaDriel
Member #3,861
September 2003
|
I am a good guy with positive mind ;-p "Code is like shit - it only smells if it is not yours" |
LennyLen
Member #5,313
December 2004
|
It was a good natured and friendly attack (as contradictory as that sounds).
|
GullRaDriel
Member #3,861
September 2003
|
Héhé. We made the thread going mad. So, do the OP is happy with the stuff and knowledge CursedTyrant gaves to him ? "Code is like shit - it only smells if it is not yours" |
Richard Phipps
Member #1,632
November 2001
|
I think The Game of Life has been run on a GPU as well. |
Johan Halmén
Member #1,550
September 2001
|
Quote: Quote: Quote: tough = thought Super Nitpick Combo Breaker: tough != thought. No. Writing "tough = thought" means assigning thought to tough. After that one can write tough. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest. |
Onewing
Member #6,152
August 2005
|
Quote: No. Writing "tough = thought" means assigning thought to tough. After that one can write tough. Good, that's what I tough. ------------ |
Arthur Kalliokoski
Second in Command
February 2005
|
I'd do it as:
[EDIT] I did have "putpixel()" where circlefill is but they were too small to see when quick testing that it'd actually work. They all watch too much MSNBC... they get ideas. |
|