Wow ... great code!
I tried to run it and get the following error:
"Run-Time Check Failure #2 - Stack around the variable 'moves' was corrupted"
Edit: found the problem, since there can be maximum of 34 moves the declarations of "Move moves[33];" must be changed to "Move moves[34];" !
P.S: there are 2 additional rules i idn't mention cuz of simplicity:
- once a piece moves into hostile base, that hostile base is broken, which means that any pieces moving into it will be destroyed
- a piece located directly beside a base will always move into it regardless of the move-type, e.g. if piece is on 3rd row beside the hosile base and the chossen move is "up", then the piece will go into the base on 3rd row and not , as expected, into base on 4th row.
PPS: i am not sure but bringing out too many pieces out of a base may strategically not be so good. So in my move generation i only consider moves with only one base (in your case 1,2,4,8,16) with additional base moves only if there is a hostile piece outside beside the base. This reduces the number of possible moves a lot.
I might also be wrong with this consideration ... i have to get a better player with this game.
Show differencesHistory of post edits
#4AticAtac
Posted 27 September 2012 - 07:51 AM
Wow ... great code!
I tried to run it and get the following error:
"Run-Time Check Failure #2 - Stack around the variable 'moves' was corrupted"
P.S: there are 2 additional rules i idn't mention cuz of simplicity:
- once a piece moves into hostile base, that hostile base is broken, which means that any pieces moving into it will be destroyed
- a piece located directly beside a base will always move into it regardless of the move-type, e.g. if piece is on 3rd row beside the hosile base and the chossen move is "up", then the piece will go into the base on 3rd row and not , as expected, into base on 4th row.
PPS: i am not sure but bringing out too many pieces out of a base may strategically not be so good. So in my move generation i only consider moves with only one base (in your case 1,2,4,8,16) with additional base moves only if there is a hostile piece outside beside the base. This reduces the number of possible moves a lot.
I might also be wrong with this consideration ... i have to get a better player with this game.
I tried to run it and get the following error:
"Run-Time Check Failure #2 - Stack around the variable 'moves' was corrupted"
P.S: there are 2 additional rules i idn't mention cuz of simplicity:
- once a piece moves into hostile base, that hostile base is broken, which means that any pieces moving into it will be destroyed
- a piece located directly beside a base will always move into it regardless of the move-type, e.g. if piece is on 3rd row beside the hosile base and the chossen move is "up", then the piece will go into the base on 3rd row and not , as expected, into base on 4th row.
PPS: i am not sure but bringing out too many pieces out of a base may strategically not be so good. So in my move generation i only consider moves with only one base (in your case 1,2,4,8,16) with additional base moves only if there is a hostile piece outside beside the base. This reduces the number of possible moves a lot.
I might also be wrong with this consideration ... i have to get a better player with this game.
#3AticAtac
Posted 27 September 2012 - 07:46 AM
Wow ... great code!
I tried to run it and get the following error:
"Run-Time Check Failure #2 - Stack around the variable 'moves' was corrupted"
P.S: there are 2 additional rules i idn't mention cuz of simplicity:
- once a piece moves into hostile base, that hostile base is broken, which means that any pieces moving into it will be destroyed
- a piece located directly beside a base will always move into it regardless of the move-type, e.g. if piece is on 3rd row beside the hosile base and the chossen move is "up", then the piece will go into the base on 3rd row and not , as expected, into base on 4th row.
I tried to run it and get the following error:
"Run-Time Check Failure #2 - Stack around the variable 'moves' was corrupted"
P.S: there are 2 additional rules i idn't mention cuz of simplicity:
- once a piece moves into hostile base, that hostile base is broken, which means that any pieces moving into it will be destroyed
- a piece located directly beside a base will always move into it regardless of the move-type, e.g. if piece is on 3rd row beside the hosile base and the chossen move is "up", then the piece will go into the base on 3rd row and not , as expected, into base on 4th row.
#2AticAtac
Posted 27 September 2012 - 07:36 AM
Wow ... great code!
I tried to run it and get the following error:
"Run-Time Check Failure #2 - Stack around the variable 'moves' was corrupted"
I tried to run it and get the following error:
"Run-Time Check Failure #2 - Stack around the variable 'moves' was corrupted"
#1AticAtac
Posted 27 September 2012 - 07:28 AM
Wow ... great code!
I tried to run it and get the following error:
"Run-Time Check Failure #2 - Stack around the variable 'moves' was corrupted"
It seems to happen once it tries to run with depth=3
I tried to run it and get the following error:
"Run-Time Check Failure #2 - Stack around the variable 'moves' was corrupted"
It seems to happen once it tries to run with depth=3