src/draw.c
void movePlayer(char input, int * posY, int * posX)
{
    switch(input)
    {
        case 'w':
            mvaddch(*posY, *posX, '.');
            *posY -= 1;
            break;
        case 'a':
            mvaddch(*posY, *posX, '.');
            *posX -= 1;
            break;
        case 's':
            mvaddch(*posY, *posX, '.');
            *posY += 1;
            break;
        case 'd':
            mvaddch(*posY, *posX, '.');
            *posX += 1;
            break;
        default:
            return;
    }
    mvaddch(*posY, *posX, '@');
    move(*posY, *posX);
}
//basic move function to move player around in rooms
basic move function to move player around in rooms
basic move function to move player around in rooms
void movePlayer(char input, int * posY, int * posX)
{
    switch(input)
    {
        case 'w':
            mvaddch(*posY, *posX, '.');
            *posY -= 1;
            break;
        case 'a':
            mvaddch(*posY, *posX, '.');
            *posX -= 1;
            break;
        case 's':
            mvaddch(*posY, *posX, '.');
            *posY += 1;
            break;
        case 'd':
            mvaddch(*posY, *posX, '.');
            *posX += 1;
            break;
        default:
            return;
    }
    mvaddch(*posY, *posX, '@');
    move(*posY, *posX);
}
void movePlayer ( char input , int * posY , int * posX ) { switch ( input ) { case ' ' : mvaddch ( * posY , * posX , ' ' ) ; * posY -= 1 ; break ; case ' ' : mvaddch ( * posY , * posX , ' ' ) ; * posX -= 1 ; break ; case ' ' : mvaddch ( * posY , * posX , ' ' ) ; * posY += 1 ; break ; case ' ' : mvaddch ( * posY , * posX , ' ' ) ; * posX += 1 ; break ; default : return ; } mvaddch ( * posY , * posX , ' ' ) ; move ( * posY , * posX ) ; }
basic move function to move player around in rooms
basic move function to move player around in rooms