City percentage

If you find a bug please report it here

City percentage

Postby Igor » Sat Mar 15, 2014 2:59 am

gameid=49335, conditions of win is 70% of all standing cities. I have 70+% of cities 2 turns a row. Game must be over, but it's still on. Is something wrong with it?
Igor
 
Posts: 1291
Joined: Fri Dec 16, 2011 2:10 pm

Re: City percentage

Postby Igor » Sat Mar 15, 2014 9:16 am

Game is now over. But is has happened only in third time when I had 70+% of all standing cities, 70.7, 70.0, 75. I still don't understand how this rule acts if it takes 3 times to fulfill the condition, I think it should take max 2 times. Can it be explained?
Igor
 
Posts: 1291
Joined: Fri Dec 16, 2011 2:10 pm

Re: City percentage

Postby KGB » Sat Mar 15, 2014 3:28 pm

Igor,

The 70% only gets applied at the *start* of your turn, not the end.

So you can end your turn with >70% and you don't win immediately. Your opponent gets a chance to put you under 70% on his turn. Maybe that's what happened in your game?

KGB
KGB
 
Posts: 3030
Joined: Tue Feb 16, 2010 12:06 am

Re: City percentage

Postby Igor » Sat Mar 15, 2014 6:24 pm

Ummm... I don't remember had I this percentage in the end of turns or at start. May be I had 70.0% at start of turn 26, but I'm not sure. I think the game should be checked though. If there is a bug there, it can be in other games as well.
I keep this game at my account a day or 2 for to give Snotling ability to check it.
Igor
 
Posts: 1291
Joined: Fri Dec 16, 2011 2:10 pm

Re: City percentage

Postby SnotlinG » Sat Mar 15, 2014 10:24 pm

Hello, I checked the code and it runs code like:

Code: Select all
    if ($playercities[$playerID]/$numberofcities > $wincondition || $numberofplayers == $numberofeliminatedplayers+1)
        {
        return $this->gamewonbyplayer($playerID);
        }


This is run at the start of your turn, so you must have more than the wincondition at the start of your turn to win the game... On second thoughts maybe I should change it to "equal or more"...
SnotlinG
 
Posts: 2148
Joined: Sat Feb 13, 2010 12:42 am

Re: City percentage

Postby SnotlinG » Sun Mar 16, 2014 9:27 am

Code has been updated for the coming version. There the check will be "equal or more".
For current games in version 0.92 we will keep the check at checking for "more".

This check is always performed at the start of your turn, so number of cities at the end of your turn doesnt matter.
SnotlinG
 
Posts: 2148
Joined: Sat Feb 13, 2010 12:42 am


Return to Bug reports

Who is online

Users browsing this forum: No registered users and 36 guests

cron
Not able to open ./cache/data_global.php