Browse Source

fixed column row issue in variable declaration

sp 11 months ago
parent
commit
6bd0eee85e
  1. 8
      util/PrismModulesPrinter.cpp

8
util/PrismModulesPrinter.cpp

@ -104,8 +104,8 @@ namespace prism {
void PrismModulesPrinter::printPortableObjectModule(const cell &object) {
std::string identifier = capitalize(object.getColor()) + object.getType();
os << "\nmodule " << identifier << std::endl;
os << " x" << identifier << " : [-1.." << maxBoundaries.second << "] init " << object.column << ";\n";
os << " y" << identifier << " : [-1.." << maxBoundaries.first << "] init " << object.row << ";\n";
os << " x" << identifier << " : [-1.." << maxBoundaries.first << "] init " << object.column << ";\n";
os << " y" << identifier << " : [-1.." << maxBoundaries.second << "] init " << object.row << ";\n";
os << " " << identifier << "PickedUp : bool;\n";
os << "\n";
@ -171,8 +171,8 @@ namespace prism {
void PrismModulesPrinter::printRobotModule(const AgentName &agentName, const coordinates &initialPosition) {
os << "\nmodule " << agentName << std::endl;
os << " col" << agentName << " : [1.." << maxBoundaries.second << "] init " << initialPosition.second << ";\n";
os << " row" << agentName << " : [1.." << maxBoundaries.first << "] init " << initialPosition.first << ";\n";
os << " col" << agentName << " : [1.." << maxBoundaries.first << "] init " << initialPosition.first << ";\n";
os << " row" << agentName << " : [1.." << maxBoundaries.second << "] init " << initialPosition.second << ";\n";
os << " view" << agentName << " : [0..3] init 1;\n";
printTurnActionsForRobot(agentName);

Loading…
Cancel
Save