hi guys i got question and i need help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shmos
    New Member
    • Nov 2009
    • 1

    hi guys i got question and i need help

    i got assiment in c++ and its about finding the answer for mase
    for example like this one


    ***-*
    *----*
    *-***
    *-***

    the answer ganna be

    down
    down
    left
    left
    down
    down

    and what i need to know that what i'm suppose to use to let the program look for the free place " the dash" ??
  • newb16
    Contributor
    • Jul 2008
    • 687

    #2
    if (inputLine[i] == '-') field.setItem(i ,y, EMPTY) else field.setItem(i ,y,USED);

    or something line this - i.e. first convert from input format to internal representation. Then google for 'lee algorihtm'

    Comment

    Working...