I need my game to move the guy up on up arrow, odwn on down arrow, etc, but i cant do it. i was think somewhere along the lines of this?
of course its wrong but any help would be appreciated.Code:if(_kbhit() == (char)75) { posone -= 1; } else if(_kbhit() == (char)77) { posone += 1; } else if(_kbhit() == (char)72) { postwo -= 1; } else if(_kbhit() == (char)80) { postwo += 1; }
P.S. posone is left(negative) right(positive) and postwo is up(negative) down(positive) on the game map.(stored in a 2d array, map[posone][postwo], get it? )