int getResult (int ary[][14], int r, int c, int action, int &complete, int &rescue)
{
int cost = 0;
//Fell in water. Must be rescued.
if (action == -1)
{
rescue++;
}
//Made it to one of the two bridges.
if (action == 3)
{
complete++;
}
//Stepped on one of two flowers in a cell. Owes $5.
if (action == 2)
{
cost = 5;
ary[r][c]--;
}
//Stepped on the last flower in a cell. Owes $5.
if (action == 1)
{
cost = 5;
ary[r][c]--;
}
return cost;
}