![]() |
.. (לתיקייה המכילה) | |
Did you update the homework after it was published ? | |
Yes (Last update was on 08.12.2016) - updates: - page 2 (dry part): The last PDP instruction was changed from add to movb. - page 6: fixed cell range to be 0-50 as stated earlier in the exercise - ex2_test.txt was updated to match the example in the exercise - page 3: updated successful scenario definition - page 4: updated numCols and numRows to be greater then 0. |
What can we assume about the size of the board? | |
Since nCols and nRows are both limited to the size of one Byte then as we learned in the tutorials nCols*nRows (=board size) is limited to the size of one word |
Can there be a ladder in the last (final) cell in the board? If so, should this be considered as a successful scenario? | |
A ladder can appear in the last cell. This isn't a successful scenarion since it was stated in the assignment that a ladder in a cell in the highest row is an error. |
Can there be a ladder/snake in the first (start) cell in the board? | |
The first cell can contain any value - ladder/snake/number. You should not evaluate the first cell at the beginning of the game. So if it's a ladder/snake you should not climb up/down and if it's a number no need to add it to score. However, if during the execution of a move you return to the first cell (for example, after climbing down a snake in the row above) then this cell should be evaluated. |
What is considered a successful scenario? | |
A successful scenario is when we have finished all the moves and arrived at the final cell. Meaning that if we reached the final cell before finishing all the moves, we continue to the next move (and this will later result in error #2). |
If after 4 moves (out of 6 total) we reached the final cell, which value should the label numMoves contain at the end? | |
As stated in the previos question, when reaching the final cell you do not stop (assuming there are more moves). You should continue to the next move and only then you will see that there is an error. So, in this example the numMoves label should contain the value 5. |
If the Moves array is empty but the Board is only one square (1x1), is it considered success? If so, what should be the value in the Score label? | |
Yes - you have finished all the moves and are in the final cell, so this counts as success. The value in the score label should be 0, since there are no moves and we only update Score when finishing a move. |
Can there be a 0x0 board? | |
No. You can assume both numCols and numRows will be positive. |