Class GsonMoveDeserializer

java.lang.Object
it.polimi.ingsw.Server.Controller.GsonMoveDeserializer
All Implemented Interfaces:
com.google.gson.JsonDeserializer<Move>

public class GsonMoveDeserializer extends Object implements com.google.gson.JsonDeserializer<Move>
Gson Move Deserializer
  • Field Details

    • b

      private final Board b
      Game's Board
    • s

      private final Shelf s
      Player's Shelf
  • Constructor Details

    • GsonMoveDeserializer

      public GsonMoveDeserializer(Board b, Shelf s)
      MoveDeserializer Constructor
      Parameters:
      b - Game's Board
      s - Player's Shelf
  • Method Details

    • deserialize

      public Move deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
      Deserialization strategy
      Specified by:
      deserialize in interface com.google.gson.JsonDeserializer<Move>
      Throws:
      com.google.gson.JsonParseException