Fixed encodeMap and added first real card test