@Override
	public void received(final Connection connection, final Object object) {
		Runnable r = new Runnable() {
			@Override
			public void run() {
				if (object instanceof PlaceUnit) {
					Log.info("Placing unit");
					PlaceUnit pu = (PlaceUnit)object;
					UnitActor ua = addUnit(pu.unitClass, pu.x, pu.y, pu.team);
					ua.data.id = pu.id;
					return;
				}
				if (object instanceof DonePlacing) {
					if (PulsatioGame.getSingleton().isserver) {
						player1placed = true;
					} else {
						player0placed = true;
					}
					return;
				}
				if (object instanceof AttackUnit) {
					AttackUnit au = (AttackUnit)object;
					UnitActor unit = findUnit(au.unitId);
					UnitActor target = findUnit(au.targetId);
					unit.attack(target, false);
					return;
				}
				if (object instanceof MoveUnit) {
					MoveUnit mu = (MoveUnit)object;
					UnitActor unit = findUnit(mu.unitId);
					unit.move(mu.x, mu.y, false);
					return;
				}
				if (object instanceof EndTurn) {
					changeTurn(whoseTurn == 0 ? 1 : 0);
					return;
				}
			}
		};
		PulsatioGame.getSingleton().runnables.add(r);
		
	}