Sorry if this is a silly question but I am confused. Negamax at the very beginning checks whether an end state or a maximum depth has been reached. You then insert a evaluation function which returns a negative or positive score for the state (one being good for one side and bad for the other and vice versa). What I find hard to get my head round is the negation below. Does that mean score returned is multiplied by -1? What does this achieve? I appreciate leaf sates 'bubble' back up alternating between minimum/maximum scores.
line: -NegaMax(c, depth+1, 1-color)
This is used to flip perspective in games with alternating moves. In each state you want to have the calculate score according to current player (positive is good, negative is bad). When you look at some child state the opponent will move there, so negamax will return estimated score according to him. You need to negate it to get score of first player.
Example: in each state choose maximum of negated children: