我的高分有时与我的分数不符

My highscore doesn't match my points at sometimes

当我以 5 分击中盖帽时,我的分数 (poang) 达到高分。他们不会更新相同,有时点(poang)将是 18 和高分将是 20.

(抱歉我的英语不好)

这些部分有问题:

        for (int j = 1; j < block.Count; j++) //loopar igenom alla block
        {
            if (boll_rect.Intersects(block[j])) //om bollen träffar rutorna
            {
                boll_speed.Y *= -1;
                poang += 1;
                block.RemoveAt(j); //tar bort gröna blocket man träffar
                if (poang > 9)
                {
                    linje_rect.Width = 60;
                }
                if (poang > highscore)
                {
                    highscore++;
                }
            }
        }

        for (int k = 1; k < block2.Count; k++) 
        {
            if (boll_rect.Intersects(block2[k])) 
            {
                boll_speed.Y *= -1;
                poang += 5;
                block2.RemoveAt(k); 
                if (poang > highscore)
                {
                    highscore += 5;
                }
                block2.RemoveAt(k); 
            }
        }

highscore++;替换为highscore = poang;

highscore += 5;highscore = poang;

以避免高分和当前分数不匹配。