Summary: Wall is moved, when the player tries to move a wall with a candy. Steps to reproduce: 1. Choose map2; 2. move a wall with candy. Actual Results: 1 2 3 4 5 6 7 8 /--------------- 1|% $ $ @ @ # $ % 2|# % @ % # % @ @ 3|2 $ @ @ $ # # $ 4|# @ # X X $ @ @ 5|@ % @ X X @ 1 @ 6|# @ $ @ # % # % 7|% # @ @ $ $ # $ 8|$ # $ # @ % @ $ Please enter your move(eg: 1 3 W): 5 3 W 1 2 3 4 5 6 7 8 /--------------- 1|% $ $ @ @ # $ % 2|# % @ % # % @ @ 3|2 $ @ @ $ # # $ 4|# @ # X X $ @ @ 5|@ % X @ X @ 1 @ 6|# @ $ @ # % # % 7|% # @ @ $ $ # $ 8|$ # $ # @ % @ $ Destroying: 1 2 3 4 5 6 7 8 /--------------- 1|% $ $ @ @ # $ % 2|# % @ % # % @ @ 3|2 $ @ @ $ # # $ 4|# @ # X X $ @ @ 5|@ % X X @ 1 @ 6|# @ $ # % # % 7|% # @ $ $ # $ 8|$ # $ # @ % @ $ Execute gravity: 1 2 3 4 5 6 7 8 /--------------- 1|% $ $ # @ # $ % 2|# % @ % # % @ @ 3|2 $ @ # $ # # $ 4|# @ # X X $ @ @ 5|@ % X @ X @ 1 @ 6|# @ $ % # % # % 7|% # @ @ $ $ # $ 8|$ # $ # @ % @ $ Swap success! Please enter your move(eg: 1 3 W): Expected Results: 1 2 3 4 5 6 7 8 /--------------- 1|% $ $ @ @ # $ % 2|# % @ % # % @ @ 3|2 $ @ @ $ # # $ 4|# @ # X X $ @ @ 5|@ % @ X X @ 1 @ 6|# @ $ @ # % # % 7|% # @ @ $ $ # $ 8|$ # $ # @ % @ $ Please enter your move(eg: 1 3 W): 5 3 W Swap fails! Please enter your move(eg: 1 3 W):
(In reply to jli262-c from comment #0) > Summary: > Wall is moved, when the player tries to move a wall with a candy. > > Steps to reproduce: > 1. Choose map2; > 2. move a wall with candy. > > Actual Results: > 1 2 3 4 5 6 7 8 > /--------------- > 1|% $ $ @ @ # $ % > 2|# % @ % # % @ @ > 3|2 $ @ @ $ # # $ > 4|# @ # X X $ @ @ > 5|@ % @ X X @ 1 @ > 6|# @ $ @ # % # % > 7|% # @ @ $ $ # $ > 8|$ # $ # @ % @ $ > Please enter your move(eg: 1 3 W): > 5 3 W > 1 2 3 4 5 6 7 8 > /--------------- > 1|% $ $ @ @ # $ % > 2|# % @ % # % @ @ > 3|2 $ @ @ $ # # $ > 4|# @ # X X $ @ @ > 5|@ % X @ X @ 1 @ > 6|# @ $ @ # % # % > 7|% # @ @ $ $ # $ > 8|$ # $ # @ % @ $ > > Destroying: > 1 2 3 4 5 6 7 8 > /--------------- > 1|% $ $ @ @ # $ % > 2|# % @ % # % @ @ > 3|2 $ @ @ $ # # $ > 4|# @ # X X $ @ @ > 5|@ % X X @ 1 @ > 6|# @ $ # % # % > 7|% # @ $ $ # $ > 8|$ # $ # @ % @ $ > > Execute gravity: > 1 2 3 4 5 6 7 8 > /--------------- > 1|% $ $ # @ # $ % > 2|# % @ % # % @ @ > 3|2 $ @ # $ # # $ > 4|# @ # X X $ @ @ > 5|@ % X @ X @ 1 @ > 6|# @ $ % # % # % > 7|% # @ @ $ $ # $ > 8|$ # $ # @ % @ $ > > Swap success! > Please enter your move(eg: 1 3 W): > > Expected Results: > 1 2 3 4 5 6 7 8 > /--------------- > 1|% $ $ @ @ # $ % > 2|# % @ % # % @ @ > 3|2 $ @ @ $ # # $ > 4|# @ # X X $ @ @ > 5|@ % @ X X @ 1 @ > 6|# @ $ @ # % # % > 7|% # @ @ $ $ # $ > 8|$ # $ # @ % @ $ > Please enter your move(eg: 1 3 W): > 5 3 W > Swap fails! > Please enter your move(eg: 1 3 W): Reason: It is caused by insufficient check of swapping walls. We only prevent walls from swapping by checking if the user chooses coordinates of a wall. Solution: Add additional check in swapItems()