// Path: src/main/java/com/scheible/risingempire/game/common/Player.java
// public class Player {
// 	
// 	public static class Prototype {
// 
// 		private final String name;
// 		private final String nation;
// 		private final String homeStar;
// 
// 		public Prototype(String name, String nation, String homeStar) {
// 			this.name = name;
// 			this.nation = nation;
// 			this.homeStar = homeStar;
// 		}
// 
// 		public String getName() {
// 			return name;
// 		}
// 
// 		public String getNation() {
// 			return nation;
// 		}
// 
// 		public String getHomeStar() {
// 			return homeStar;
// 		}
// 	}	
// 	
// 	private final String name;
// 	private final String nation;
// 
// 	public Player(String name, String nation) {
// 		this.name = name;
// 		this.nation = nation;
// 	}
// 
// 	public String getName() {
// 		return name;
// 	}
// 
// 	public String getNation() {
// 		return nation;
// 	}
// 	
// 	@Override
// 	public int hashCode() {
// 		return Objects.hash(name, nation);
// 	}
// 
// 	@Override
// 	public boolean equals(Object obj) {
// 		if (obj == this) {
// 			return true;
// 		} else if (obj instanceof Player) {
// 			Player other = (Player) obj;
// 			return Objects.equals(name, other.name) && Objects.equals(nation, other.nation);
// 		} else {
// 			return false;
// 		}
// 	}
// }
// 
// Path: src/main/java/com/scheible/risingempire/game/common/event/Event.java
// public abstract class Event {
// 
// }
// 
// Path: src/main/java/com/scheible/risingempire/game/common/event/RandomMessageEvent.java
// public class RandomMessageEvent extends Event {
// 
// 	private final String message;
// 
// 	public RandomMessageEvent(String message) {
// 		this.message = message;
// 	}
// 
// 	public String getMessage() {
// 		return message;
// 	}
// }
// 
// Path: src/main/java/com/scheible/risingempire/game/common/view/View.java
// public class View {
//     
// 	private final List<Player> players;
// 	private final List<Star> stars;
// 	private final List<Fleet> fleets;
// 	
// 	private final List<Event> events;
// 
// 	public View(String nation, List<Player> players, List<Star> stars, List<Fleet> fleets, List<Event> events) {
// 		this.players = players;
// 		this.stars = stars;
// 		this.fleets = fleets;
// 		
// 		this.events = events;
// 	}
// 
// 	public List<Player> getPlayers() {
// 		return players;
// 	}
// 
// 	public List<Star> getStars() {
// 		return stars;
// 	}
// 
// 	public List<Fleet> getFleets() {
// 		return fleets;
// 	}
// 
// 	public List<Event> getEvents() {
// 		return events;
// 	}
// }


import com.scheible.risingempire.game.common.Player;
import com.scheible.risingempire.game.common.event.Event;
import com.scheible.risingempire.game.common.event.RandomMessageEvent;
import com.scheible.risingempire.game.common.view.View;
import java.util.Map;
package com.scheible.risingempire.web.game.message.server;


/**
 *
 * @author sj
 */
public class TurnFinishedMessage {
	
	private final Player player;
	private final Map<String, String> colorMapping; // <nationName, #??????>
	
	private final int turn;
	private final View view;

	public TurnFinishedMessage(Player player, Map<String, String> colorMapping, int turn, View view) {
		this.player = player;
		this.colorMapping = colorMapping;
		
		this.turn = turn;
		this.view = view;
		
		// NOTE We have to exchange all event instance with ones that contain the EventType info.
		int eventIndex = -1;
		for(Event event : view.getEvents()) {
// Path: src/main/java/com/scheible/risingempire/game/common/Player.java
// public class Player {
// 	
// 	public static class Prototype {
// 
// 		private final String name;
// 		private final String nation;
// 		private final String homeStar;
// 
// 		public Prototype(String name, String nation, String homeStar) {
// 			this.name = name;
// 			this.nation = nation;
// 			this.homeStar = homeStar;
// 		}
// 
// 		public String getName() {
// 			return name;
// 		}
// 
// 		public String getNation() {
// 			return nation;
// 		}
// 
// 		public String getHomeStar() {
// 			return homeStar;
// 		}
// 	}	
// 	
// 	private final String name;
// 	private final String nation;
// 
// 	public Player(String name, String nation) {
// 		this.name = name;
// 		this.nation = nation;
// 	}
// 
// 	public String getName() {
// 		return name;
// 	}
// 
// 	public String getNation() {
// 		return nation;
// 	}
// 	
// 	@Override
// 	public int hashCode() {
// 		return Objects.hash(name, nation);
// 	}
// 
// 	@Override
// 	public boolean equals(Object obj) {
// 		if (obj == this) {
// 			return true;
// 		} else if (obj instanceof Player) {
// 			Player other = (Player) obj;
// 			return Objects.equals(name, other.name) && Objects.equals(nation, other.nation);
// 		} else {
// 			return false;
// 		}
// 	}
// }
// 
// Path: src/main/java/com/scheible/risingempire/game/common/event/Event.java
// public abstract class Event {
// 
// }
// 
// Path: src/main/java/com/scheible/risingempire/game/common/event/RandomMessageEvent.java
// public class RandomMessageEvent extends Event {
// 
// 	private final String message;
// 
// 	public RandomMessageEvent(String message) {
// 		this.message = message;
// 	}
// 
// 	public String getMessage() {
// 		return message;
// 	}
// }
// 
// Path: src/main/java/com/scheible/risingempire/game/common/view/View.java
// public class View {
//     
// 	private final List<Player> players;
// 	private final List<Star> stars;
// 	private final List<Fleet> fleets;
// 	
// 	private final List<Event> events;
// 
// 	public View(String nation, List<Player> players, List<Star> stars, List<Fleet> fleets, List<Event> events) {
// 		this.players = players;
// 		this.stars = stars;
// 		this.fleets = fleets;
// 		
// 		this.events = events;
// 	}
// 
// 	public List<Player> getPlayers() {
// 		return players;
// 	}
// 
// 	public List<Star> getStars() {
// 		return stars;
// 	}
// 
// 	public List<Fleet> getFleets() {
// 		return fleets;
// 	}
// 
// 	public List<Event> getEvents() {
// 		return events;
// 	}
// }


// Path: src/main/java/com/scheible/risingempire/web/game/message/server/TurnFinishedMessage.java
import com.scheible.risingempire.game.common.Player;
import com.scheible.risingempire.game.common.event.Event;
import com.scheible.risingempire.game.common.event.RandomMessageEvent;
import com.scheible.risingempire.game.common.view.View;
import java.util.Map;

package com.scheible.risingempire.web.game.message.server;


/**
 *
 * @author sj
 */
public class TurnFinishedMessage {
	
	private final Player player;
	private final Map<String, String> colorMapping; // <nationName, #??????>
	
	private final int turn;
	private final View view;

	public TurnFinishedMessage(Player player, Map<String, String> colorMapping, int turn, View view) {
		this.player = player;
		this.colorMapping = colorMapping;
		
		this.turn = turn;
		this.view = view;
		
		// NOTE We have to exchange all event instance with ones that contain the EventType info.
		int eventIndex = -1;
		for(Event event : view.getEvents()) {
			eventIndex++;