package com.cardshifter.api.both;

import java.util.HashMap;
import java.util.Map;

import com.cardshifter.api.config.PlayerConfig;
import com.cardshifter.api.messages.Message;

public class PlayerConfigMessage extends Message {

	private Map<String, PlayerConfig> configs;
	
	private int gameId;
	private String modName;

	public PlayerConfigMessage() {
		this(0, "", null);
	}

	public PlayerConfigMessage(int gameId, String modName, Map<String, PlayerConfig> configs) {
		super("playerconfig");
		this.gameId = gameId;
		this.modName = modName;
		this.configs = configs;
	}
	
	public Map<String, PlayerConfig> getConfigs() {
		return new HashMap<String, PlayerConfig>(configs);
	}
	
	public int getGameId() {
		return gameId;
	}

	public String getModName() {
		return modName;
	}

    @Override
    public String toString() {
        return "PlayerConfigMessage{" +
                "configs=" + configs +
                ", gameId=" + gameId +
                ", modName='" + modName + '\'' +
                '}';
    }
}

@@ -171,16 +171,66 @@
 ssage;%0A%0A
+/**%0A * Player configuration for a given game.%0A */%0A
 public c
@@ -365,17 +365,51 @@
 odName;%0A
+%09%0A%09/** Constructor. (no params) */
 %0A
-
 %09public 
@@ -452,25 +452,202 @@
 , null);%0A%09%7D%0A
+%09/**%0A%09 * Constructor.%0A%09 * @param gameId  This game%0A%09 * @param modName  The mod name for this game%0A%09 * @param configs  Map of player name and applicable player configuration%0A%09 */
 %0A
-
 %09public Play
@@ -828,24 +828,94 @@
 onfigs;%0A%09%7D%0A%09
+/** @return  Map of player name and applicable player configuration */
 %0A%09public Map
@@ -1009,16 +1009,41 @@
 s);%0A%09%7D%0A%09
+/** @return  This game */
 %0A%09public
@@ -1081,17 +1081,60 @@
 eId;%0A%09%7D%0A
+%09/** @return  The mod name for this game */
 %0A
-
 %09public 
@@ -1176,21 +1176,70 @@
 ame;%0A%09%7D%0A
-%0A    
+%09/** @return  This message as converted to String */%0A%09
 @Overrid
@@ -1240,20 +1240,17 @@
 verride%0A
-    
+%09
 public S
@@ -1268,24 +1268,17 @@
 ing() %7B%0A
-        
+%09
 return %22
@@ -1301,25 +1301,25 @@
 age%7B%22 +%0A
- 
+%09
         
        %22
@@ -1310,23 +1310,16 @@
         
-       
 %22configs
@@ -1333,29 +1333,25 @@
 nfigs +%0A
-     
+%09
         
    %22, ga
@@ -1342,19 +1342,16 @@
         
-   
 %22, gameI
@@ -1365,24 +1365,17 @@
 ameId +%0A
-        
+%09
         
@@ -1407,24 +1407,17 @@
  '%5C'' +%0A
-        
+%09
         
@@ -1421,16 +1421,13 @@
    '%7D';%0A
-    
+%09
 %7D%0A%7D%0A

Update PlayerConfigMessage.java