git repos / blockattack-game

commit 9d59a0e2

sago007 · 2013-11-15 23:05
9d59a0e2621d725e202e97da40dd54ed6bd60fb5 patch · browse files
parent e68d08ebd78276292fcb526dfb35320e779aa8aa

Added a little randomization to the shattered blocks

Changed files

M source/code/main.cpp before
diff --git a/source/code/main.cpp b/source/code/main.cpp index 7b0eb4b..cd8054b 100644 --- a/source/code/main.cpp +++ b/source/code/main.cpp
@@ -917,7 +917,7 @@ public:
//constructor:
aBall(int X, int Y, bool right, int coulor)
{
- double tal = 1.0;
+ double tal = 1.0+((double)rand()/((double)RAND_MAX));
velocityY = -tal*startVelocityY;
lastTime = currentTime;
x = (double)X;