aboutsummaryrefslogtreecommitdiffstats
path: root/Utils.lua
diff options
context:
space:
mode:
authorpiernov <piernov@piernov.org>2014-04-16 22:59:56 +0200
committerpiernov <piernov@piernov.org>2014-04-16 22:59:56 +0200
commit7ae446b661c47b41ed38d7f88b8f54416575e47f (patch)
tree4e95b54230b5e468f16a22bbe3bc2174a1d622d8 /Utils.lua
parent8ce1e6f75a68f5d92fe4bf27263a861c16e71f35 (diff)
downloadMastermind-7ae446b661c47b41ed38d7f88b8f54416575e47f.tar.gz
Mastermind-7ae446b661c47b41ed38d7f88b8f54416575e47f.tar.bz2
Mastermind-7ae446b661c47b41ed38d7f88b8f54416575e47f.tar.xz
Mastermind-7ae446b661c47b41ed38d7f88b8f54416575e47f.zip
Split file + Working Solo mode :
Add hints + Disallow multiple identical colors in same line + Correctly randomize answer
Diffstat (limited to 'Utils.lua')
-rw-r--r--Utils.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/Utils.lua b/Utils.lua
new file mode 100644
index 0000000..c811e1b
--- /dev/null
+++ b/Utils.lua
@@ -0,0 +1,9 @@
+local Utils = {}
+
+function Utils.percentCoordinates(x, y)
+ x = (x/100)*Screen.width
+ y = (y/100)*Screen.height
+ return x, y
+end
+
+return Utils \ No newline at end of file