minustehbare / CSE4705_final

Game of the Amazons AI for final project.
2 stars 0 forks source link

GetReachableNodes #6

Closed Dr-Steve closed 13 years ago

Dr-Steve commented 13 years ago

getReachableNodes causes a stack overflow

searing commented 13 years ago

I'll look into this now.

Dr-Steve commented 13 years ago

Yea, it looks like this: public List getReachableNodes(int index) { return getReachableNodes(index); }

I think you meant to deref the index into a row and column then run the other getReachableNodes method

searing commented 13 years ago

Silly me. One of the extra methods (that does the same thing except with different arguments) was simply calling itself... like 'public int foo() { return foo(); }'

Anyways, I ran a test on some sample input, and although I haven't checked the accuracy of the answers (really quick fix), none of them throw an exception anymore.