software-challenge / backend

Server, Client und Spiel-Plugins der Software-Challenge Germany
https://www.software-challenge.de
11 stars 10 forks source link

Protocol error when sending moves with debug hints #244

Closed matthesjh closed 4 years ago

matthesjh commented 4 years ago

When a client sends a move that has a debug hint attached, the server terminates the game and responds with the following error message.

com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$UnknownFieldException: No such field sc.plugin2020.SetMove.hint
---- Debugging information ----
message             : No such field sc.plugin2020.SetMove.hint
field               : hint
class               : sc.plugin2020.SetMove
required-type       : sc.plugin2020.SetMove
converter-type      : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
line number         : 1
class[1]            : sc.protocol.responses.RoomPacket
required-type[1]    : sc.protocol.responses.RoomPacket
version             : 1.4.11.1
-------------------------------

The problem is that the debug hints are removed from the move classes with the first Hive release.

matthesjh commented 4 years ago

@Xerus2000 Will this be addressed in the near future?

xeruf commented 4 years ago

The debug hints were never properly implemented if I remember correctly, and afaik they were primarily useful for the multi-Action Moves in Hase & Igel - what would be your use-case here? I am happy to add them back if they make sense.

matthesjh commented 4 years ago

They are implemented in the Ruby client too. The debug hints are useful to add some comments to a move, e.g. why the move is selected …

xeruf commented 4 years ago

Should work now, otherwise write again