From 792956deb989958cf81f022e436b2917b041da90 Mon Sep 17 00:00:00 2001 From: Tim Quatmann Date: Wed, 13 Jan 2021 13:27:48 +0100 Subject: [PATCH] Fixing output of player construct. --- src/storm/storage/prism/Player.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/storm/storage/prism/Player.cpp b/src/storm/storage/prism/Player.cpp index 353a2b8da..2b288f67f 100644 --- a/src/storm/storage/prism/Player.cpp +++ b/src/storm/storage/prism/Player.cpp @@ -24,14 +24,24 @@ namespace storm { if (player.getName() != "") { stream << " " << player.getName(); } - stream << std::endl; + bool firstElement = true; for (auto const& module : player.getModules()) { - stream << "\t" << module << std::endl; + if (firstElement) { + firstElement = false; + } else { + stream << ","; + } + stream << std::endl << "\t" << module; } for (auto const& action : player.getActions()) { - stream << "\t[" << action << "]" << std::endl; + if (firstElement) { + firstElement = false; + } else { + stream << ","; + } + stream << std::endl << "\t[" << action << "]"; } - stream << "endplayer" << std::endl; + stream << std::endl << "endplayer" << std::endl; return stream; } } // namespace prism