entity.setDone(true); entityUpdate(entity.getId());
GameTurn turn = game.getTurn(); if (turn.getPlayerNum() == connId && turn.isValidEntity(entity)) { processAttack(entity, vector); endCurrentTurn(); } else { System.err.println("error: server got invalid attack packet"); }
    private void receiveAttack(Packet pkt) {        Vector vector = (Vector)pkt.getObject(1);        Entity entity = game.getEntity(pkt.getIntValue(0));        for (Enumeration i = vector.elements(); i.hasMoreElements();) {            EntityAction ea = (EntityAction)i.nextElement();                        // move push attacks the end of the displacement attacks            if (ea instanceof PushAttackAction) {                PushAttackAction paa = (PushAttackAction)ea;                entity.setDisplacementAttack(paa);                pendingCharges.addElement(paa);            } else {                // add to the normal attack list.                attacks.addElement(ea);            }                        // if torso twist, twist so that everybody can see it later            if (ea instanceof TorsoTwistAction) {                TorsoTwistAction tta = (TorsoTwistAction)ea;                game.getEntity(tta.getEntityId()).setSecondaryFacing(tta.getFacing());            } else if (ea instanceof FlipArmsAction) {                FlipArmsAction faa = (FlipArmsAction)ea;                game.getEntity(faa.getEntityId()).setArmsFlipped(faa.getIsFlipped());            }                                    // send an outgoing packet to everybody            send(createAttackPacket(ea));        }        // this entity is done for the round        entity.setDone(true);        entityUpdate(entity.getId());    }