Skip to content

Commit

Permalink
Merge pull request #15 from BestDownLoader365/fix_1
Browse files Browse the repository at this point in the history
run can only use in battleinterface
  • Loading branch information
BestDownLoader365 committed Mar 18, 2024
2 parents be32295 + 31e1c9f commit c28a224
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/main/java/command/fight/RunningCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@

import command.Command;
import map.*;
import map.BattleInterface.BattleInterface;

public class RunningCommand extends Command {
public RunningCommand() {
commandDescription = "RUN!";
}
@Override
public void execute(){
AMap initMap = new FirstMap();
initMap.initMap(30, 10);
initMap.initPlayerLocation(0, 0);
initMap.placeMonsterInTheMap(2, 3);
currentMap = initMap;
if(currentMap instanceof BattleInterface) {
AMap initMap = new FirstMap();
initMap.initMap(30, 10);
initMap.initPlayerLocation(0, 0);
initMap.placeMonsterInTheMap(2, 3);
currentMap = initMap;
}
}
}

0 comments on commit c28a224

Please sign in to comment.