pp

Dependencies:   mbed

Revision:
4:a61cdd4e7afa
Parent:
1:ba7154d2d7ca
--- a/Game.cpp	Sat Dec 05 16:43:40 2015 +0000
+++ b/Game.cpp	Sat Dec 05 19:01:26 2015 +0000
@@ -1,27 +1,8 @@
 #include"Game.h"
-
-const char hex[16] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
-const bool bcd[16][4] = {{0,0,0,0},{0,0,0,1},{0,0,1,0},{0,0,1,1},{0,1,0,0},{0,1,0,1},{0,1,1,0},{0,1,1,1},
-                         {1,0,0,0},{1,0,0,1},{1,0,1,0},{1,0,1,1},{1,1,0,0},{1,1,0,1},{1,1,1,0},{1,1,1,1}};
-
-char Game::gethex(int dec)
-{
-    return hex[dec];
-}
-void Game::random()
-{
-    for(int i=0;i<n;i++)
-    {
-        //hexRandom[i] = random
-    }
-}
-void Game::hextobcd()
-{
-    for(int i=0;i<n;i++)
-    {
-        mybcd[i][0] = bcd[hexRandom[i]][0];
-        mybcd[i][1] = bcd[hexRandom[i]][1];
-        mybcd[i][2] = bcd[hexRandom[i]][2];
-        mybcd[i][3] = bcd[hexRandom[i]][3];
-    }
-}
+                         
+Game::Game(){level=1;}
+int Game::randomHex(float x) {return (int)(x*1000)%16;}
+int checkButton(int x) {return x;}
+int Game::getlevel() {return level;}
+void Game::resetlevel() {level = 0;}
+void Game::pluslevel() {if(level<4)level++;}