2048 SetViewingPerspective Quiz
This quiz is not required for a grade. The points on this quiz are not worth anything.
Sign in to Google to save your progress. Learn more
Suppose we have the board below.
Starting Board
The correct board after pressing left should be:
The code below (with some blanks not filled out) will result in the correct board. In the following questions you'll fill in these blanks.
What goes in blank A?
0 points
Clear selection
After the call from above, what column will the 2 tiles appear to be in from the new viewing perspective?
0 points
Clear selection
Recommendation: Before continuing, draw the board as it appears from the Side.WEST perspective (2s all in the rightmost column). For convenience, we repeat the code block below:
What goes in B, D, F, H, J, L?
0 points
Clear selection
After filling in A, B, D, F, H, J, L, we have:
And the board from the WEST perspective looks like:
What goes in C?
0 points
Clear selection
What goes in E?
0 points
Clear selection
What goes in G?
0 points
Clear selection
What goes in I?
0 points
Clear selection
What goes in K?
0 points
Clear selection
What goes in M?
0 points
Clear selection
What goes in N?
0 points
Clear selection
Note that our solution above did not take into account points, nor did it call setChanged() or return true. A full hard-coded solution to the board for this problem is given below. The code below only works for the exact board state given in this Google quiz.
Submit
Clear form
This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy