package com.cardshifter.api.outgoing;

import com.cardshifter.api.messages.Message;

import java.util.Collections;
import java.util.Map;

public class CardInfoMessage extends Message {
//	SERVER: command: card, zone: 3, id: 3, properties: { name: 'Biofsd', power: 3, health: 4, cardType: 'Creature', creatureType: 'B0T' }
	
	private int zone;
	private int id;

	private Map<String, Object> properties;

	public CardInfoMessage() {
		this(0, 0, null);
	}
	public CardInfoMessage(int zoneId, int cardId, Map<String, Object> properties) {
		super("card");
		this.zone = zoneId;
		this.id = cardId;
		this.properties = properties;
	}
	
	public int getId() {
		return id;
	}
	
	public Map<String, Object> getProperties() {
		return properties == null ? null : Collections.unmodifiableMap(properties);
	}
	
	public int getZone() {
		return zone;
	}
	
	@Override
	public String toString() {
		return "CardInfo: " + id + " in zone " + zone + " - " + this.properties;
	}
	
}

@@ -131,16 +131,106 @@
 l.Map;%0A%0A
+/**%0A * Message containing information about a specific card to be used by the client.%0A */%0A
 public c
@@ -443,17 +443,16 @@
 int id;%0A
-%0A
 %09private
@@ -485,16 +485,49 @@
 rties;%0A%0A
+%09/** Constructor. (no params) */%0A
 %09public 
@@ -569,16 +569,211 @@
 ll);%0A%09%7D%0A
+%09/**%0A%09 * Constructor.%0A%09 * @param zoneId  The zone where this card is%0A%09 * @param cardId  The Id of this card%0A%09 * @param properties  Object containing the properties of this card, can be null%0A%09 */%0A
 %09public 
@@ -937,24 +937,59 @@
 erties;%0A%09%7D%0A%09
+/** @return  The Id of this card */
 %0A%09public int
@@ -1012,24 +1012,107 @@
 urn id;%0A%09%7D%0A%09
+/** @return  Object containing the properties of this card, returns null if null */
 %0A%09public Map
@@ -1228,16 +1228,59 @@
 s);%0A%09%7D%0A%09
+/** @return  The zone where this card is */
 %0A%09public
@@ -1315,16 +1315,251 @@
 ne;%0A%09%7D%0A%09
+/**%0A%09 * @return  The name of this action requested to be performed%0A%09 * @example  %3Ccode%3ESERVER: command: card, zone: 3, id: 3, properties: %7B name: 'Conscript', power: 3, health: 4, cardType: 'Creature', creatureType: 'Bio' %7D%3C/code%3E%0A%09 */
 %0A%09@Overr

Update CardInfoMessage.java