diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2024-08-07 19:13:02 +0300 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2024-08-07 19:23:24 +0300 |
commit | 04b5a62b8d9f5ff8240f25361046f2a5d58e8262 (patch) | |
tree | 98b126454cdf68d544e138d7e8b31d5fd45b72c2 /kue/utility.h | |
parent | 83ba00b7e569587d50383ff06a70148042ca780e (diff) | |
download | tdegames-feat/kue.tar.gz tdegames-feat/kue.zip |
Add Kue billiards gamefeat/kue
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'kue/utility.h')
-rw-r--r-- | kue/utility.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/kue/utility.h b/kue/utility.h new file mode 100644 index 00000000..56343acb --- /dev/null +++ b/kue/utility.h @@ -0,0 +1,31 @@ +#ifndef _UTILITY_H +#define _UTILITY_H + +#include "texture.h" + +// Helper functions for rules implementations +namespace KueUtility { + enum rackType {None, Triangle, Diamond}; + + // Regulation table layout + void layoutTable(); + // Regulation pocket layout + void layoutPockets(); + + // Lays out the billiard in either 8-ball or 9-ball style, or just + // place the cue ball (with rack_type = None) + // Billiard 0 becomes the cue ball, and the rest of the billiards + // are indexed according to their face number + void layoutBilliards(rackType rack_type = None); + + // The texture for a given billiard index + KueTexture textureForBilliard(unsigned int index); + + // Regulation radius of billiards, in meters + double defaultBilliardRadius(); + + // Regulation radius of pockets, in meters + double defaultPocketRadius(); +}; + +#endif |