diff options
| author | suyambulingamrm <suyambu.rm@samsung.com> | 2014-05-26 19:32:56 +0530 |
|---|---|---|
| committer | suyambulingamrm <suyambu.rm@samsung.com> | 2014-05-26 19:32:56 +0530 |
| commit | 1ee11eb12e10ddefc6c5038e0471f50e32601806 (patch) | |
| tree | 2d4877ed45abbc72133b2464462beefebd4b867b /src/shapes.cpp | |
| parent | 2e3eb555e89f1a5a3d36f05c7484ac7b2a8bdcff (diff) | |
Issue #50. Removed hardcoded number of shapes.
Diffstat (limited to 'src/shapes.cpp')
| -rw-r--r-- | src/shapes.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/shapes.cpp b/src/shapes.cpp index 60a170e..142bc1c 100644 --- a/src/shapes.cpp +++ b/src/shapes.cpp @@ -40,7 +40,11 @@ shape_randomize(shapes_t *shape) // TODO } - +shape_type_t +generate_random_shape() +{ + return (shape_type_t) ((((double)(CB_SHAPE_END-1) * rand())/RAND_MAX) + 1); +} /* Local Variables: |