Browse Source

updated output after shop

remotes/origin/fdai7372-main-patch-93194
KRUGSON 2 years ago
parent
commit
885c2a806f
  1. 6
      src/c/main.c

6
src/c/main.c

@ -126,6 +126,8 @@ void processInput(char userInput[20])
}
else if (strcmp(userInput, "shop") == 0)
{
lastPlayerPosition = playerPosition; //playerPosition doesn't change but lastPlayerPosition needs update
Room actualRoom = map[playerPosition];
if (actualRoom.shopAvailable == 1)
{
@ -223,12 +225,12 @@ void printStatus()
{
strcpy(moveMessage, "START");
}
else
else if(lastPlayerPosition == playerPosition)
{
strcpy(moveMessage, "You didn't move");
}
if (lastPlayerPosition != playerPosition || playerPosition == 0 && inputCounter == 0)
if (lastPlayerPosition != playerPosition || lastPlayerPosition == playerPosition || playerPosition == 0 && inputCounter == 0)
{
printf("\n\n################################################################################\n");

Loading…
Cancel
Save