Zaktualizuj 'Main.cpp'

This commit is contained in:
Karol Piotrowski 2020-06-06 23:04:18 +00:00
parent d0efae4171
commit a1976880c9

View File

@ -38,7 +38,7 @@ char currentWay = 'S';
//algorytm genetyczny //algorytm genetyczny
int scoreBuraki = 0; int scoreBuraki = 0;
int scoreZiemniaki = 0; int scoreZiemniaki = 0;
int rozmiarPopulacji = 50; int rozmiarPopulacji = 500;
string * zebraneBuraki = new string[rozmiarPopulacji]; string * zebraneBuraki = new string[rozmiarPopulacji];
string * zebraneZiemniaki = new string[rozmiarPopulacji]; string * zebraneZiemniaki = new string[rozmiarPopulacji];
string * burakiDoSadzenia = new string[20]; string * burakiDoSadzenia = new string[20];
@ -590,7 +590,7 @@ void Move(char kierunek)
} }
updatePola(); updatePola();
}break; }break;
//dA3A-(s) //dA3A-(s)
case 's': case 's':
{ {
if (pole[pozycjaTraktoraY + 1][pozycjaTraktoraX][0] != '#') if (pole[pozycjaTraktoraY + 1][pozycjaTraktoraX][0] != '#')
@ -721,7 +721,7 @@ void tracePath(cell cellDetails[][COL], Pair dest)
if (p.second < pozycjaTraktoraY) if (p.second < pozycjaTraktoraY)
Move('w'); Move('w');
//printf("-> (%d,%d) ", p.first, p.second); //---- informacja wierzchoĹku //printf("-> (%d,%d) ", p.first, p.second); //---- informacja wierzchoÅku
Sleep(1000); Sleep(1000);
} }
@ -1055,7 +1055,7 @@ void start1()
generujKody(); generujKody();
//sendState(); //trzeba rÄ™cznie zmieniać miÄ™dzy wysyĹaniem stanu a pobieraniem stanu pola //sendState(); //trzeba rÄ™cznie zmieniać miÄ™dzy wysyÅaniem stanu a pobieraniem stanu pola
reciveState(); reciveState();
} }
void start2() void start2()