mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
don't truncate gameID
In some cases games were created with 32-bit ids, and sometimes only 20 bits were used.
This commit is contained in:
parent
fdbd404f37
commit
5175775b1d
1 changed files with 4 additions and 3 deletions
|
@ -1312,8 +1312,9 @@ public class GameUtils {
|
|||
public static String formatGameID( int gameID )
|
||||
{
|
||||
Assert.assertTrue( 0 != gameID );
|
||||
// substring: Keep it short so fits in SMS better
|
||||
return String.format( "%X", gameID ).substring( 0, 5 );
|
||||
// I used to truncate this for smaller SMS messages, but gameID has
|
||||
// become important enough that we want to use all 32 bits.
|
||||
return String.format( "%X", gameID );
|
||||
}
|
||||
|
||||
public static String makeRandomID()
|
||||
|
@ -1322,7 +1323,7 @@ public class GameUtils {
|
|||
return formatGameID( rint );
|
||||
}
|
||||
|
||||
public static int newGameID()
|
||||
private static int newGameID()
|
||||
{
|
||||
int rint;
|
||||
do {
|
||||
|
|
Loading…
Reference in a new issue