home · contact · privacy
Return cookie chars sorted.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 16 Dec 2020 18:56:50 +0000 (19:56 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 16 Dec 2020 18:56:50 +0000 (19:56 +0100)
plomrogue/things.py

index dd14db5b657352c16d2a0db0adc1e175db4a2b53..4cc3512cf82cc952f85e80ae9c35d00cd04538c5 100644 (file)
@@ -626,6 +626,9 @@ class Thing_Player(ThingAnimate):
             self.game.players_hat_chars[self.name] += c
 
     def get_cookie_chars(self):
             self.game.players_hat_chars[self.name] += c
 
     def get_cookie_chars(self):
+        chars = ' #'  # default
         if self.name in self.game.players_hat_chars:
         if self.name in self.game.players_hat_chars:
-            return self.game.players_hat_chars[self.name]
-        return ' #'  # default
+            chars = self.game.players_hat_chars[self.name]
+        chars_split = list(chars)
+        chars_split.sort()
+        return ''.join(chars_split)