Game of Life - HELP!

This is a discussion on Game of Life - HELP! within the C Programming forums, part of the General Programming Boards category; Dear All, Our Lecturer has set us the task of writing a program to play the Game of Life, it ...

  1. #1
    Registered User
    Join Date
    Jan 2004
    Posts
    1

    Game of Life - HELP!

    Dear All,

    Our Lecturer has set us the task of writing a program to play the Game of Life, it starts by us setting up a matrix... how do we set up matrices and where do we go from there?

    Please help, we are lost without you!

    Folklord*

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,417
    > how do we set up matrices
    int pond[10][10];

    pond[0][0] is one corner
    pond[9][9] is the opposite corner

    > where do we go from there?
    I assume your lecturer gave you the rules for determining who lives, dies and gets born

    I suppose a function to count the neighbours of a cell would be a good start.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Open-source Game Project
    By Glorfindel in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 03-24-2009, 01:12 AM
  2. 2D RPG Online Game Project. 30% Complete. To be released and marketed.
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 10-28-2006, 12:48 AM
  3. C Programming 2d Array Question
    By jeev2005 in forum C Programming
    Replies: 3
    Last Post: 04-26-2006, 03:18 PM
  4. Game Of Life
    By din1983 in forum C Programming
    Replies: 20
    Last Post: 10-11-2005, 10:36 PM
  5. Please help with some coding..
    By stehigs321 in forum C Programming
    Replies: 2
    Last Post: 10-27-2003, 05:44 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21