Score malfunction

I have some issues implementing the bonus tasks because the added score after every move is way to high (+2048 on the first move)
I tried to test it by hardcoding v0 and v1 at the end of complete move. I chose 1 for v0 and 4 for v1, but when i tested it in the GUI the score changed to 128. Shouldn’t it change to 4 or am i misunderstanding something?

No, it should not change to 4.
128 should be the right number.
The idea is, that you want to move the whole board with one keyboard input, and not just one line. So one move (pressing a key) is “translated” into, for our example (4x4 Board), 4 times calling the subroutine complete_move.asm. And after the calls, the computation of the points by the GUI takes place.

Here a short computation example:

(4+4+4+4)*2^((1+1+1+1)-1)
=16*(2³)
=16*8
=128

If you need an example, what you have to implement in the bonus task, I recommend taking a look at page 27/28 of the project presentation.

2 Likes

Thank you :grin:

1 Like