is there any more easy way cause i dont know what half of that means |
1 line: <iostream> standard input/output library for console.
2 line: <conio.h> is the library i used to check the what keyboard key was pressed
3 line: <string.h> is to handle strings
4 line: std namespace so I don't write "std::cout" but just "cout"
5 line: COMMENT
6 line: a function that returns what keyboard key was pressed
7 line: EMPTY SPACE
8 line: main function initialize
9 line: {
10 line: initialize some variables. x,y,key
11 line: plr character init.
12 line: COMMENT
13 line: Just an intro message
14 line: pausing until the user presses some key...
15 line: COMMENT
16 line: WHILE LOOP
17 line: COMMENT
18 line: Check what key was pressed and store the key in "key" variable
19 line: check if RIGHT was pressed
20 line: check if LEFT was pressed
21 line: check if UP was pressed
22 line: check if DOWN was pressed
23 line: COMMENT
24 line: write where player is. making y break lines and x spaces
25 line: Clear Screen
26 line: }
27 line: return value of main
28 line: }
29 line: