Skip to content

Commit 81edbf7

Browse files
anarchuserxeruf
authored andcommitted
feat(sdk): convert the DebugHint class to kotlin
The new DebugHint doesn't allow null values. Empty hints ("") are allowed for XStream compliance.
1 parent a26cfee commit 81edbf7

File tree

2 files changed

+26
-74
lines changed

2 files changed

+26
-74
lines changed

socha-sdk/src/framework/sc/shared/DebugHint.java

Lines changed: 0 additions & 74 deletions
This file was deleted.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package sc.shared
2+
3+
import com.thoughtworks.xstream.annotations.XStreamAsAttribute
4+
5+
/**
6+
* An additional note to be appended to a move.
7+
* These notes can then be displayed in the GUI if debugging is enabled.
8+
*
9+
* This enables faster debugging of clients and easier configuring of strategies as
10+
* important information gets displayed together with the corresponding move (instead of the CLI)
11+
* ===
12+
* Ein Debughinweis ist ein Container für einen String, der einem Zug beigefuegt
13+
* werden kann. Beigefuegte Debughints werden direkt in der grafischen
14+
* Oberflaeche des Plugins angezeigt, wenn die Debugansicht gewaehlt wurde.
15+
*
16+
* Dies ermöglicht das schnellere Debuggen von Clients und besseres
17+
* Konfigurieren von Strategien, denn es müssen keine Konsolenausgaben gesucht
18+
* werden und die Hinweise werden immer zum passenden Zug angezeigt.
19+
*/
20+
class DebugHint(@XStreamAsAttribute val content: String = "") : Cloneable {
21+
/**
22+
* This constructs a hint of the form "key = value"
23+
*/
24+
constructor(key: String, value: String) : this("$key = $value")
25+
}
26+

0 commit comments

Comments
 (0)