@Override
	public void update(Observable o, Object arg) {
		ServerModel model = presenter.getClientModel().getServerModel();
		Player player = model.getPlayerByID(presenter.getPlayerInfo().getID());
		getView().setElementAmount(ResourceBarElement.BRICK, player.getBrick());
		getView().setElementAmount(ResourceBarElement.ORE, player.getOre());
		getView().setElementAmount(ResourceBarElement.SHEEP, player.getSheep());
		getView().setElementAmount(ResourceBarElement.WHEAT, player.getWheat());
		getView().setElementAmount(ResourceBarElement.WOOD, player.getWood());
		
		getView().setElementAmount(ResourceBarElement.CITY, player.getCities());
		getView().setElementAmount(ResourceBarElement.SETTLEMENT, player.getSettlements());
		getView().setElementAmount(ResourceBarElement.ROAD, player.getRoads());
		
		getView().setElementAmount(ResourceBarElement.SOLDIERS, player.getSoldiers());
		
		if(presenter.isPlayersTurn()) {
			if(player.canBuildCity()){
				getView().setElementEnabled(ResourceBarElement.CITY, true);
			}else{
				getView().setElementEnabled(ResourceBarElement.CITY, false);
			}
			if(player.canBuildRoad()){
				getView().setElementEnabled(ResourceBarElement.ROAD, true);
			}else{
				getView().setElementEnabled(ResourceBarElement.ROAD, false);
			}
			if(player.canBuildSettlement()){
				getView().setElementEnabled(ResourceBarElement.SETTLEMENT, true);
			}else{
				getView().setElementEnabled(ResourceBarElement.SETTLEMENT, false);
			}
			if(model.getDeck().getTotalDevCardCount()>0&&player.canBuyDevCard()){
				getView().setElementEnabled(ResourceBarElement.BUY_CARD, true);
			}else{
				getView().setElementEnabled(ResourceBarElement.BUY_CARD, false);
			}
		}
		else {
			getView().setElementEnabled(ResourceBarElement.CITY, false);
			getView().setElementEnabled(ResourceBarElement.ROAD, false);
			getView().setElementEnabled(ResourceBarElement.SETTLEMENT, false);
		}
	}