.. (לתיקייה המכילה) | ||
What is the order that the parameters are passed on the stack? | |
The order of pushing input parameters in the stack is the order they are mentioned in the assignment. |
What does the Subs label contain throughout the program? | |
The Subs label contains the CURRENT number of subs of all sizes and not the FINAL number of subs of all sizes. This array is filled with zeros when the board is empty and every successful call to AddShip updates this array appropriately. |
Can the values in the Board cells be changed? | |
You may save any values in the board's cells as long as your functions' implementations comply with the definitions described in the HW (return values etc). |
How exactly should the ValOnBoard function be used? | |
ValOnBoard is a helper function for your use - it should return the Value-On-the-Board as it is. Since you may save any numbers on the board as you see fit - we will(/can) NOT check this function. |
How can we know the maximal ship size while using addShip? | |
You can assume there is a label MAX_SIZE which states the location of a word holding the maximal ship size (hence the Sub array length) |
What should be the state of Board and Subs after a call to AddShip that does not succeed? | |
You should not add a ship if it causes the board to enter an illegal state. Namely, A call to AddShip that returns anything but '0' implies that board is identical to its state from before calling AddShip and the same applies to the Subs array. |
What are legal ship sizes? | |
1,2,3,....MAX_SIZE (including) |