Thread: WireWorld

  1. #31
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    How does the program receive the map? As a command-line parameter? Or is that implementation-defined?
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  2. #32
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,218
    Yeah, a filename supplied by a command-line parameter:
    The task:
    Write a program in standard C89 or C++98 (including the STL) to implement a wireworld simulation.
    The program will be given a single command line parameter, namely the name of the configuration file in the above format.
    If you understand what you're doing, you're not learning anything.

  3. #33
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Oops, I missed that, thanks.

    Should the program assume that the terminal is 80x25? If the input file is 80 wide, for the tty implementation under DOS, you can't print a newline after the text.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  4. #34
    Registered User
    Join Date
    Oct 2004
    Posts
    151
    In *nix there are environment variables COLUMNS and LINES which give the dimensions of the screen.
    Last edited by zx-1; 09-22-2006 at 06:02 PM.
    System: Debian Sid and FreeBSD 7.0. Both with GCC 4.3.

    Useful resources:
    comp.lang.c FAQ | C++ FQA Lite

  5. #35
    Algorithm engineer
    Join Date
    Jun 2006
    Posts
    286
    Have you all checked this out? (java example of wireworld)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. The inner-workings of a uP
    By Cell in forum Tech Board
    Replies: 26
    Last Post: 02-23-2009, 01:54 PM
  2. WireWorld - call for entries
    By Salem in forum Contests Board
    Replies: 8
    Last Post: 10-13-2006, 11:22 PM