Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<conio.h>
- using namespace std;
- int main(){
- char cTab[24][80];
- char ruch = 0;
- enum klawisz{Gora = 80, Dol = 72, Prawo = 77, Lewo = 75, Esc = 27};
- int x = 10;
- int y = 10;
- for(int i=0; i<24; i++){
- for(int j=0; j<80; j++){
- cTab[i][j]=' ';
- }
- }
- while(static_cast<int>(ruch)!=27){
- ruch=getch();
- switch(static_cast<int>(ruch)){
- case Prawo:
- y=y+1;
- cTab[x][y]='x';
- break;
- }
- for(int i=0; i<24; i++){
- for(int j=0; j<80; j++){
- cout<<cTab[i][j];
- }
- }
- }
- system("PAUSE");
- return 0;
- }
Add Comment
Please, Sign In to add comment