I know how a unit test works
you have an expected output and compare it to the result of actually running the code
but how do you do this for a videogame? do you have to implement a virtual player?
@efi The thing is - you have layers of tests

Unit tests focus on testing often just individual functions

Component tests take a connected system of units - like the AI or rendering subsystem

Integration tests make sure components interact correctly - often testing completely assembled final product

Acceptance testing then takes the entire product, hands it to users and watches if it performs as intended with the target audience in the loop
@veronica meoooooow