Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Program Zad2;
- Uses CRT;
- Var dx, dy: integer;
- Cmd: char;
- Begin
- ClrScr();
- dx := 0;
- dy := 0;
- WriteLn( '*' );
- Repeat
- Cmd := ReadKey;
- ClrScr();
- Case UpCase( Cmd ) of
- 'W': dy := dy - 1;
- 'S': dy := dy + 1;
- 'A': dx := dx - 1;
- 'D': dx := dx + 1;
- End;
- GotoXY( dx, dy );
- WriteLn( '*' );
- Until UpCase( Cmd ) = 'Q';
- ReadLn;
- End.
Add Comment
Please, Sign In to add comment