The game needs:
4 Stones : #,@,%,$ at position 1,2,3,4
Name of player and position.
When start, it needs an output like this:
Jack(0) #(1) @(2) %(3) $(4) Treasure/6\(5)
When we press l,r,p,d: player will move left or right, or (p) pick up stone or (d) put stone into chest.
I have the problem is when press p, the player will pick up stone and the symbol will disappeare from its position and appeare next to the player name.
>> Jack(1) #(1) @(2) %(3) $(4) Treasure/6\(5)
>> Jack#(0) (1) @(2) %(3) $(4) Treasure/6\(5)
Can someone help me how to do this, please ...