Browse Source

RemovedTrainingDataandFixedDifficulty

master
lunarised 4 years ago
parent
commit
d3e5570a23
1 changed files with 8 additions and 4 deletions
  1. +8
    -4
      Mastermind/Mastermind.ino

+ 8
- 4
Mastermind/Mastermind.ino View File

@@ -13,7 +13,7 @@ int v1 = 0;
int v2 = 0;
int v3 = 0;
int v4 = 0;
int diff = 2;
int diff = 0;
int turnsRemaining = 0;
int master = 0;
int incorrect = 0;
@@ -35,7 +35,8 @@ void setup() {

void loop() {
// put your main code here, to run repeatedly:
int inp = analogRead(A1);
difficultyState();
//int inp = analogRead(A1);
generateRandomValues();
Serial.println(master);
correct = 0;
@@ -77,8 +78,11 @@ void loop() {

/* SETS THE GAME DIFFICULTY */
void difficultyState() {
while (readPins() == 5) {
}
diff = readPins();
turnsRemaining = (diff * 4) + 4;
diff = (diff * 4) + 4;
delay (500);
}


@@ -103,7 +107,7 @@ int readPins() {

void generateRandomValues() {
master = random(0, 256);
master = 228;
//TEST VALUE master = 228;
}
void checkValues() {
bool v1p = false, v2p = false, v3p = false , v4p = false;


Loading…
Cancel
Save