Question about bonus assignment

For bonus assingment, it asks us to put number of merges to $v0.
However I put it into there, after that part in the rest part of the test code it changes $v0 to 10.
How am I supposed to show the count of the merges in $v0 after execution ends?

You just have to make sure that the subroutine merge and complete_move are returning the amount of moves in $v0 and the sum $v1.

la $a0 buf
    la $a1 4
    jal merge #after this line $v0 is 2, if we merged twice
    la $a0 board
    li $a1 16
 	jal print_board_test
	li	$v0 10  #but here it will be 10 again
	syscall

I mean that is the problem actually.
This code is taken from a test file.

This test does not test for correctness of the bonus exercise. There are no public tests for the bonus exercise, only daily and eval tests. You have to write tests for the bonus exercise yourself.

1 Like