Package net.royalur.notation
Interface Notation
- All Known Implementing Classes:
JsonNotation
,RGN
public interface Notation
A notation can be used as a shared format for distributing
games of the Royal Game of Ur. Notations can be used to encode
games into text, and to decode games from text. They are not
guaranteed to be lossless in their conversion. Therefore, you
should check the specific notation you are considering to
determine the information that it is able to save.
-
Method Summary
Modifier and TypeMethodDescriptiondecodeGame
(String encoded) Decodes the game from the textencoded
, based upon the rulesrules
.encodeGame
(Game game) Encodes the given game,game
, into text.
-
Method Details
-
encodeGame
Encodes the given game,game
, into text.- Parameters:
game
- The game to be encoded.- Returns:
- Text that represents
game
in this notation.
-
decodeGame
Decodes the game from the textencoded
, based upon the rulesrules
.- Parameters:
encoded
- The text to decode into a game.- Returns:
- The decoded game.
-