From 184fa43df2e14c73162e641bc9bc83e403f069ed Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 17 Apr 2010 11:49:25 +0000 Subject: (svn r19652) -Fix: RandomRange() is used for bigger ranges in many cases, so generally extent it to handle 32 bits. --- bin/ai/regression/regression.nut | 6 +++--- bin/ai/regression/regression.txt | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'bin/ai') diff --git a/bin/ai/regression/regression.nut b/bin/ai/regression/regression.nut index 5f835c528..8891ca090 100644 --- a/bin/ai/regression/regression.nut +++ b/bin/ai/regression/regression.nut @@ -192,9 +192,9 @@ function Regression::Base() print(" RandRange(2): " + AIBase.RandRange(2)); print(" RandRange(2): " + AIBase.RandRange(2)); print(" RandRange(2): " + AIBase.RandRange(2)); - print(" RandRange(9): " + AIBase.RandRange(9)); - print(" RandRange(9): " + AIBase.RandRange(9)); - print(" RandRange(9): " + AIBase.RandRange(9)); + print(" RandRange(1000000): " + AIBase.RandRange(1000000)); // 32 bit tests + print(" RandRange(1000000): " + AIBase.RandRange(1000000)); + print(" RandRange(1000000): " + AIBase.RandRange(1000000)); print(" Chance(1, 2): " + AIBase.Chance(1, 2)); print(" Chance(1, 2): " + AIBase.Chance(1, 2)); print(" Chance(1, 2): " + AIBase.Chance(1, 2)); diff --git a/bin/ai/regression/regression.txt b/bin/ai/regression/regression.txt index 611450f46..effd50a78 100644 --- a/bin/ai/regression/regression.txt +++ b/bin/ai/regression/regression.txt @@ -96,10 +96,10 @@ RandRange(1): 0 RandRange(2): 0 RandRange(2): 0 - RandRange(2): 1 - RandRange(9): 6 - RandRange(9): 7 - RandRange(9): 4 + RandRange(2): 0 + RandRange(1000000): 987346 + RandRange(1000000): 781750 + RandRange(1000000): 191841 Chance(1, 2): true Chance(1, 2): false Chance(1, 2): false -- cgit v1.2.3-70-g09d2