You aren't passing any parameters into the function. I don't know why that even compiles. Haha.
Also, move the system("cls") to after the system("pause"). It's clearing really quickly so you can't see anything probably.
Also, do you have a function that redraws the board every loop? The board won't refresh itself just cause you alter some values. You have to change the values, clear the screen, and then draw the new board.
I also noticed that theres no link from the 'movements (what piece do you want to move)' etc to the Algorithm. The computer doesnt know what to swap. Am i right?
That's the correct order of things, but your functions need arguments.
You defined in the original post your function getpiecetomove() with four arguments. You have to pass it four arguments when you call it. So, yes you are exactly right. The computer doesn't know what to swap.
1 2 3 4 5 6 7 8 9 10
// Now it does. :)
getpiecetomove(w, x, y, z);
system("cls");
// I haven't seen how you defined this function, but if it has arguments
// you have to pass arguments to it like we did with the first one.
// If there are no arguments you still need the parentheses, but you leave them
// empty like I did below.
displayBoard();