There should be no math done on a boolean check if there is math, they are doing it wrong lel. They should be checking yes or no, that's it. Assuming houses are objects and players are objects, which they should be...I remember they showed us a lot of random statistics one time, such as how many times someone had said Yoshi-P in the game and how many times the squadron NPCs had squat. They particularly record the battle log across all players so that they can gather mass statistics from it, such as the win and loss rate of each job in PvP.
They tend to have a good idea of how many people main each job even though this game involves switching jobs a lot and how popular content is. They also know how popular FATEs are, because they told us the one in Azim Steppe was popular around the world and they wanted to copy the concept for Shadowbringers.
All I can say about the housing is that they used an external server and I think I remember it being caused by a bottleneck. So the math did not function because it had no data with which to use the math on because the data had not reached the players at the expected time, or something like that.
this will be somewhat pseudo, as this is pseudo will not follow an actual language but should be understandable...:"
bidUI(); <---opens UI..handles which buttons are shown on UI generation...hides bid button if not isBiddableHouse...
void houseConfirm(object house, object player){
//fetch dynamic assigned housing dates and confirm it is a biddable house...would need to declare function that does that
bool houseBool = isBiddableHouse(house);
if(houseBool && buttonPress(specificBidButton)){
onBid(player);
} else {
//fetch arraydata as you should implement a function to manipulate and get the player winner
object winner = houseWinner();
---> Assign houseWinner to a newArray that will check if the player already owns a house...
}
}
object houseWinner(){
//this is where we would fetch our array data so let's assume we made that function...fetch data handles manipulation to read back into a new array;
array myFetchData = manipulateData("...locationOfData");
int rand = newrand(myFetchData.GetSize()-1); <--- this would get an int at random by our array size (i.e the maximum number), as arrays start at zero we would need to -1
object playerWinner = myFetchData[rand];
return playerWinner;
}
void onBid(object player, int date){
//closeDate will need to be the date at which you can bid until, after bidding allow the houses to do nothing
int closeDate;
if(date < closeDate) {array bidArr = arrBid(player);} else {player.ShowMsg("The bidding for this house has passed");}
}
array arrBid(object player) {
array myArray;
//add player object to array if you cannot do that find player name and instead hold strings in an array then find player by that string...
myArray.Add(player);
return myArray;
//convert array to string if you plan to save it to file, you will need to make a separate fetch function
}
this outlines the general idea...the logic might not be 100% sound as I have no way of testing unless I made a program and followed the instructions but again this was done out quickly.
I don't trust the numbers they show if they can't do this much...