Thread: Chutes&Lads

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    16

    Chutes&Lads

    Need help writting code that simulates the game. Here is the rules.
    1. Games start with input of "player" and 20 numbers that simulate roles, EX:
    Jim 2 4 10 9 6 5 4 10 11 12 8 7 12 4 5 10 5 5 8 10
    2. All players start on 1,
    3. Roles advances players incrementally
    if the player ends up on a position that contains the top of the chute or bottom of ladder the player moves to the end of the chute or ladder
    4. When player advances too or passes 100 player wins
    5. If player does not reach 100, player does not win.
    This is suppose to be a simple thing but other than the basic setup..I'm stumped.
    All I can use is:
    structs, strings, for loops, and the sort...
    the Prof said that we should use a two dymensional string (?)

    help

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    16

    Chutes&Lads

    I meant to ask for ways to set up the program, like

    struct
    {
    string name;
    int role;
    int chute_start; //or should these be strings?
    int chute_end; // " " "
    int ladder_start
    etc};

    Awhh, I don't know where to go with this!
    Could I just get some ideas on the set-up?
    please.

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    16

    Chutes&Lads

    Hey,
    Thanks for all the tips, I will post tha "core" basic game tomorrow.
    Again Thanks to all.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Chutes&Lads
    By Mule in forum C++ Programming
    Replies: 0
    Last Post: 04-12-2003, 10:09 PM