No, Hamas is committing war crimes by deliberately launching rockets from an area packed with civilians, knowing that some of them will be killed by the return fire. And doubly so if you consider that the rockets Hamas is launching are targeting densely packed cities (without military targets nearby)