Canosa is a 2-player game with complete information, the kind of game where the first player may have an advantage.
That's why the publisher and I decided to add meta-statistics (by this I mean statistics that make no sense about a single game, but have meaning when you consider a large set) to check how often first player wins. If you play first and win, you get a 100 in "first player win", your opponent gets a 100 in "second player loss" and everything else stays at 0. Computed on many games, you get a win/loss % for both first and second player.
The problem with this is : I update the stats when the ending condition is met. But players may concede or leave and never reach the ending condition ! All stats remain at 0 in that case and my win/loss % are wrong.
So my question is : can I detect when a player concedes or leaves and update statistics at that moment to count a loss for that player and a win for the opponent ?
That's why the publisher and I decided to add meta-statistics (by this I mean statistics that make no sense about a single game, but have meaning when you consider a large set) to check how often first player wins. If you play first and win, you get a 100 in "first player win", your opponent gets a 100 in "second player loss" and everything else stays at 0. Computed on many games, you get a win/loss % for both first and second player.
The problem with this is : I update the stats when the ending condition is met. But players may concede or leave and never reach the ending condition ! All stats remain at 0 in that case and my win/loss % are wrong.
So my question is : can I detect when a player concedes or leaves and update statistics at that moment to count a loss for that player and a win for the opponent ?