RemovedTrainingDataandFixedDifficulty

This commit is contained in:
lunarised 2019-06-19 21:45:16 +12:00
parent f9272cea90
commit d3e5570a23

View File

@ -13,7 +13,7 @@ int v1 = 0;
int v2 = 0; int v2 = 0;
int v3 = 0; int v3 = 0;
int v4 = 0; int v4 = 0;
int diff = 2; int diff = 0;
int turnsRemaining = 0; int turnsRemaining = 0;
int master = 0; int master = 0;
int incorrect = 0; int incorrect = 0;
@ -35,7 +35,8 @@ void setup() {
void loop() { void loop() {
// put your main code here, to run repeatedly: // put your main code here, to run repeatedly:
int inp = analogRead(A1); difficultyState();
//int inp = analogRead(A1);
generateRandomValues(); generateRandomValues();
Serial.println(master); Serial.println(master);
correct = 0; correct = 0;
@ -77,8 +78,11 @@ void loop() {
/* SETS THE GAME DIFFICULTY */ /* SETS THE GAME DIFFICULTY */
void difficultyState() { void difficultyState() {
while (readPins() == 5) {
}
diff = readPins(); diff = readPins();
turnsRemaining = (diff * 4) + 4; diff = (diff * 4) + 4;
delay (500);
} }
@ -103,7 +107,7 @@ int readPins() {
void generateRandomValues() { void generateRandomValues() {
master = random(0, 256); master = random(0, 256);
master = 228; //TEST VALUE master = 228;
} }
void checkValues() { void checkValues() {
bool v1p = false, v2p = false, v3p = false , v4p = false; bool v1p = false, v2p = false, v3p = false , v4p = false;