public ArrayList<GameCoreInstruction> readNetworkMessages()
	{
		if ( isServer )
		{
			if ( GameCore.getInstanceOfGameCore().getGameState().equals(GameState.WAITING_FOR_PLAYERS) )
			{
				if ( server.waitForPlayer() )
				{ //client connected to server:
					ArrayList<GameCoreInstruction> ret = new ArrayList<GameCoreInstruction>();
					ret.add( GameCore.getInstanceOfGameCore().new NewClientConnectedGameCoreInstruction() );
					return ret;
				}
			} else
			{
				//Interpret message:
				ArrayList<GameCoreInstruction> ret = new ArrayList<GameCoreInstruction>();
				for ( NetworkMessage nm : server.receiveNetworkMessages() )
					ret.add( interpretNetworkMessage(nm) );
				
				return ret;				
			}
		} else
		{
			try
			{
				//Interpret message:
				ArrayList<GameCoreInstruction> ret = new ArrayList<GameCoreInstruction>();
				for ( NetworkMessage nm : client.readNetworkMessage() )
					ret.add( interpretNetworkMessage(nm) );
				
				return ret;
			} catch (InterruptedException | ExecutionException | TimeoutException e)
			{
				//ignore:
				//e.printStackTrace();
				
				//now we have a problem: the server is gone:
				ArrayList<GameCoreInstruction> reportErrorToView = new ArrayList<GameCoreInstruction>();
				reportErrorToView.add( interpretNetworkMessage( new NetworkMessage( "serverLoss", null ) ) );
				
				return reportErrorToView;
			}
		}
		
		return new ArrayList<GameCoreInstruction>(); //return an empty list when reaching this position...
	}