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 Type
    Method
    Description
    decodeGame(String encoded)
    Decodes the game from the text encoded, based upon the rules rules.
    Encodes the given game, game, into text.
  • Method Details

    • encodeGame

      String encodeGame(Game game)
      Encodes the given game, game, into text.
      Parameters:
      game - The game to be encoded.
      Returns:
      Text that represents game in this notation.
    • decodeGame

      Game decodeGame(String encoded)
      Decodes the game from the text encoded, based upon the rules rules.
      Parameters:
      encoded - The text to decode into a game.
      Returns:
      The decoded game.