From 669717268201197412c69df36e65883b0af6fac8 Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Mon, 5 Nov 2018 10:06:37 -0800 Subject: Tests work now, + other cleanup --- Source/Random.cpp | 4 +-- Source/Source.vcxproj | 81 ++++++++++++++++++++++--------------------- Source/Source.vcxproj.filters | 57 ------------------------------ 3 files changed, 43 insertions(+), 99 deletions(-) delete mode 100644 Source/Source.vcxproj.filters (limited to 'Source') diff --git a/Source/Random.cpp b/Source/Random.cpp index c921e58..d8f5eb2 100644 --- a/Source/Random.cpp +++ b/Source/Random.cpp @@ -7,8 +7,8 @@ void Random::SetSeed(int seed) { s_seed = seed; } +// Returns a random integer in [min, max] int Random::RandInt(int min, int max) { s_seed = (214013 * s_seed + 2531011) % 2147483648; - if (min == max) return min; - return (s_seed % (max - (min - 1))) + min; + return (s_seed % (max - min + 1)) + min; } diff --git a/Source/Source.vcxproj b/Source/Source.vcxproj index d140781..8d13e00 100644 --- a/Source/Source.vcxproj +++ b/Source/Source.vcxproj @@ -18,25 +18,9 @@ x64 - - - - - - - - - - - - - - - - 15.0 - {5C019BEA-E0B4-4215-825F-6A228CD3AE27} + {6B5DF051-A51A-48CB-8ACD-C6FAD726019F} Win32Proj Source 10.0.17134.0 @@ -86,9 +70,6 @@ - - false - true @@ -98,66 +79,70 @@ false - + + false + + NotUsing - Level2 - MaxSpeed - true - true + Level3 + Disabled true - NDEBUG;_LIB;%(PreprocessorDefinitions) + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) true stdcpp17 - true Windows - true - true true - + - Use + NotUsing Level3 Disabled true - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + _DEBUG;_LIB;%(PreprocessorDefinitions) true + stdcpp17 + MultiThreadedDebug Windows true - + NotUsing - Level2 - Disabled + Level3 + MaxSpeed + true + true true - _DEBUG;_LIB;%(PreprocessorDefinitions) + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) true stdcpp17 - true Windows + true + true true - + - Use + NotUsing Level3 MaxSpeed true true true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + NDEBUG;_LIB;%(PreprocessorDefinitions) true + stdcpp17 Windows @@ -166,6 +151,22 @@ true + + + + + + + + + + + + + + + + diff --git a/Source/Source.vcxproj.filters b/Source/Source.vcxproj.filters deleted file mode 100644 index fe9204f..0000000 --- a/Source/Source.vcxproj.filters +++ /dev/null @@ -1,57 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file -- cgit 1.4.1