Commit 88daa8e9 by Patryk Czarnik

Kółko i krzyżyk - obsługa klawiatury numerycznej

parent 38501062
......@@ -43,15 +43,15 @@ void wypisz_plansze() {
bool ustaw_pole(char ruch, char co_ustawic) {
int x, y;
switch(ruch) {
case 'q': x=0; y=0; break;
case 'w': x=0; y=1; break;
case 'e': x=0; y=2; break;
case 'a': x=1; y=0; break;
case 's': x=1; y=1; break;
case 'd': x=1; y=2; break;
case 'z': x=2; y=0; break;
case 'x': x=2; y=1; break;
case 'c': x=2; y=2; break;
case 'Q': case 'q': case '7': x = 0; y = 0; break;
case 'W': case 'w': case '8': x = 0; y = 1; break;
case 'E': case 'e': case '9': x = 0; y = 2; break;
case 'A': case 'a': case '4': x = 1; y = 0; break;
case 'S': case 's': case '5': x = 1; y = 1; break;
case 'D': case 'd': case '6': x = 1; y = 2; break;
case 'Z': case 'z': case '1': x = 2; y = 0; break;
case 'X': case 'x': case '2': x = 2; y = 1; break;
case 'C': case 'c': case '3': x = 2; y = 2; break;
default:
cout << "Nieznany ruch\n";
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment