@@ -3737,34 +3737,8 @@ PenaltyRef::penalty_check_score()
3737
3737
<< M_stadium.teamRight ().penaltyPoint ()
3738
3738
<< ((M_cur_pen_taker == RIGHT) ? " *" : " " ) << " after "
3739
3739
<< M_pen_nr_taken << " penalties." << std::endl;
3740
-
3741
- // if both players have taken more than nr_kicks penalties -> check for winner
3742
- if ( M_pen_nr_taken > 2 * ServerParam::instance ().penNrKicks () )
3743
- {
3744
- if ( M_pen_nr_taken % 2 == 0
3745
- && ( M_stadium.teamLeft ().penaltyPoint ()
3746
- != M_stadium.teamRight ().penaltyPoint () ) )
3747
- {
3748
- std::cerr << " Final score: "
3749
- << M_stadium.teamLeft ().penaltyPoint () << " -"
3750
- << M_stadium.teamRight ().penaltyPoint () << std::endl;
3751
- if ( M_stadium.teamLeft ().penaltyPoint ()
3752
- > M_stadium.teamRight ().penaltyPoint () )
3753
- {
3754
- M_stadium.sendRefereeAudio ( " penalty_winner_l" );
3755
- }
3756
- else
3757
- {
3758
- M_stadium.sendRefereeAudio ( " penalty_winner_r" );
3759
- }
3760
- // M_stadium.changePlayMode( PM_TimeOver );
3761
- M_timeover = true ;
3762
- }
3763
- }
3764
3740
// if both players have taken nr_kicks and max_extra_kicks penalties -> quit
3765
- else if ( M_pen_nr_taken > 2 * ( ServerParam::instance ().penMaxExtraKicks ()
3766
- + ServerParam::instance ().penNrKicks () )
3767
- )
3741
+ if (M_pen_nr_taken > 2 * (ServerParam::instance ().penMaxExtraKicks () + ServerParam::instance ().penNrKicks ()))
3768
3742
{
3769
3743
std::cerr << " Final score: "
3770
3744
<< M_stadium.teamLeft ().penaltyPoint () << " -"
@@ -3791,6 +3765,29 @@ PenaltyRef::penalty_check_score()
3791
3765
// M_stadium.changePlayMode( PM_TimeOver );
3792
3766
M_timeover = true ;
3793
3767
}
3768
+ // if both players have taken more than nr_kicks penalties -> check for winner
3769
+ else if ( M_pen_nr_taken > 2 * ServerParam::instance ().penNrKicks () )
3770
+ {
3771
+ if ( M_pen_nr_taken % 2 == 0
3772
+ && ( M_stadium.teamLeft ().penaltyPoint ()
3773
+ != M_stadium.teamRight ().penaltyPoint () ) )
3774
+ {
3775
+ std::cerr << " Final score: "
3776
+ << M_stadium.teamLeft ().penaltyPoint () << " -"
3777
+ << M_stadium.teamRight ().penaltyPoint () << std::endl;
3778
+ if ( M_stadium.teamLeft ().penaltyPoint ()
3779
+ > M_stadium.teamRight ().penaltyPoint () )
3780
+ {
3781
+ M_stadium.sendRefereeAudio ( " penalty_winner_l" );
3782
+ }
3783
+ else
3784
+ {
3785
+ M_stadium.sendRefereeAudio ( " penalty_winner_r" );
3786
+ }
3787
+ // M_stadium.changePlayMode( PM_TimeOver );
3788
+ M_timeover = true ;
3789
+ }
3790
+ }
3794
3791
// during normal kicks, check whether one team cannot win anymore
3795
3792
else
3796
3793
{
0 commit comments