- exclude bad numbers in getRandNumber (tools.cpp)
- delete warnings in localplayer
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
void Tools::getRandNumber(int start, int end, int howMany, int* randArray, bool different, int* bad) {
|
||||
void Tools::getRandNumber(int start, int end, int howMany, int* randArray, bool different, int* bad, int countBad) {
|
||||
|
||||
int r = end-start+1;
|
||||
unsigned char rand_buf[4];
|
||||
@@ -61,7 +61,7 @@ void Tools::getRandNumber(int start, int end, int howMany, int* randArray, bool
|
||||
for (i=0; i<(end-start+1); i++) tempArray[i]=1;
|
||||
|
||||
if(bad) {
|
||||
for(i=0;i<(int)(sizeof(bad)/sizeof(int));i++) {
|
||||
for(i=0;i<countBad;i++) {
|
||||
tempArray[bad[i]]=0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user