What happens when a baseball player is “DFA’ed” and then signs with another team?

I’m asking specifically about Pablo Sandoval, who signed a five year contract with Boston Red Sox, and is now owed $18 million each for 2018 and 2019, plus the balance of his 2017 salary. He was designated for assignment because 1) he had become a “replacement” player, and 2) he was being paid way too much for a level of performance that a “minimum wage” player called up from the minors could match or exceed.

The San Francisco Giants may now want Sandoval back, perhaps on a “trial” basis. Will they have to pick up his expensive contract to rehire him? Can they pay him what they think he’s worth and have Boston pick up the difference? Or can they pick up the full contract and dump it back on Boston if they DFA Sandoval themselves?

Have others in the past elected to play again when (in Sandoval’s case) they could collect over $40 million (or some lower amount) over several years while not playing?

What has happened in these types of situations?

Summoning enderpearls on arrows with custom name shot by a player

I want to shoot an arrow named “GreenArrow” that constantly summons enderpearls named “GreenPearl”.
Those pearls should execute a command at armorstands within 1 block. That command is /setblock ~ ~-1 ~ wool 5.

To do this, I have 4 command blocks, and 2 dummy scoreboard objectives. the dummy objectives are as follows:

/scoreboard objectives add GreenArrow dummy
/scoreboard objectives add GreenPearl dummy

The 4 command blocks that are repeating and always active, are as such:

/scoreboard players set @e[type=arrow] GreenArrow 1 {CustomName:"GreenArrow"}

/execute @e[type=arrow,score_GreenArrow_min=1] ~ ~ ~ summon ender_pearl ~ ~ ~ {CustomName:"GreenPearl"}

/scoreboard players set @e[type=ender_pearl] GreenPearl 1 {CustomName:"GreenPearl"}

/execute @e[type=ender_pearl,score_GreenPearl_min=1] ~ ~ ~ execute @e[type=armor_stand,r=1] ~ ~ ~ setblock ~ ~-1 ~ wool 5

This works when the arrow us summoned using this command,

/summon arrow ~ ~80 ~ {CustomName:"GreenArrow"}

but not when shot by a player. I have tested with a arrow with the custom name in it’s NBT data and when renamed in a anvil.

The arrow is shot just fine, but is not detected by the command blocks unless summoned as previously mentioned.

I do belive it has something to do with the way the arrow is shot, in creative mode or survival/adventure there is no difference. It seemes like the arrow looses it’s NBT data after being fired from a bow. There were no issues with this before the CustomName was added.

Are anyone here able to assist?

If a player sets a monster that is revealed to be invalid when it is flipped face up, what happens?

Say that a player sets a monster. It sits there for a few turns and then the opponent attacks it, flipping it face up. Unfortunately, it turns out that it couldn’t have been set. Perhaps it was a Link Monster (which can never be put in Defense Mode) or a Tribute Monster that was set without the proper tribute.

What happens? Given that a few turns have passed, it may be impossible to “rewind” to a point where the monster was set, so I’m not sure how the game can continue. In a tournament, would the player who illegally set the monster be required to forfeit the game?

What happens if a player makes an illegal move and nobody notices?

What happens if a player makes an illegal move (i.e. a realistic case could be, he castles after he already moved the King), but none of the player notices, and the game goes on and on for a lot of moves? Is the final result to be taken as valid? On another note, what happens if a player, after some moves, realizes that, say, move 10 was illegal, and could not be made?

Display canvas in front of player

I have stuck in this simple problem but unable to understand that why i am unable to control it.

I have these line of code which is displaying my canvas object in front of my player(camRotationToWatch object name in code) at certain rotation of the player.

if (camRotationToWatch.transform.localEulerAngles.x >= navigationCanvasXMinmumLimit && camRotationToWatch.transform.localEulerAngles.x <= navigationCanvasXMaximumLimit)
        {
            if (!navCanvasHasDisplay) 
            {

                navigationCanvas.SetActive(true);
                //Debug.Log(camRotationToWatch.transform.forward);
                Vector3 navCanvas = camRotationToWatch.transform.position + camRotationToWatch.transform.forward * navCanvasDisplayDistanceFromCam;
                navCanvas = new Vector3(navCanvas.x, 2f, navCanvas.z);
                navigationCanvas.transform.position = new Vector3(navCanvas.x, navCanvas.y, navCanvas.z);

                navigationCanvas.transform.rotation = camRotationToWatch.transform.rotation;

                navCanvasHasDisplay = true;

            }
        }

        else
        {
            //navigationCanvas.SetActive(false);
            if (locationPanel.activeSelf == false && infoPanel.activeSelf == false) {
                navigationCanvas.SetActive(false);
                navCanvasHasDisplay = false;
            }
        }

This code is actually work fine when camRotationToWatch object rotate from down to up and Canvas show at correct position but as I try to to rotate camRotationToWatch from up to down it display(active) Canvas at very top position. How can I restrict canvas to show at same position (No matter player rotate from up to down or down to up) but display on front of the player object?

Playing a game, a Chinese player says this: “德莱厄斯两兄弟” What does it mean?

I was getting along with a teammate, and then a third guy (who was speaking english before) says this:

德莱厄斯两兄弟

Google translate just says “Two Brothers”,
and I can’t figure a different definition by looking at each character individually

Is this an actual phrase? Or perhaps an English speaker plugging something into google translate and getting random gibberish?

Do I need a database to support a sign-in system to associate a player with their save/highscore data?

I am making a 2d game with Unity, and in my game I want to add a username and a password for each player, so that when the player signs in, they will get all the data about what they played until the moment they signed in (like their highscore and so on)

So my question is: do I need to use a database like sqlite, or could this be done with Unity without needing an external database?

LibGDX – Animate Player using Finite State Machine in Ashley ECS

Hi everyone this is my first question on this forum hope you can clarify my doubt.
I’m gonna start by saying that im not very good at english so my apologies.

So I have a big school project and I’m developing a Pixel Platformer game using libGDX for it.

I’m using ECS for the most part, but I’ve been having trouble rendering my player’s animations because I can not distinguish the state of the player or at least the attack ones.

Player State Class

Let me jsut show you, so I have this “move” states:

public enum PlayerState implements State {

Idle(){
    @Override
    public void update(PlayerAgent agent) {
        agent.moveOnGround();
        if(!agent.isTouchingGround) {
            if (agent.body.getLinearVelocity().y < -0.05)
                agent.stateMachine.changeState(Falling);
            else
                agent.stateMachine.changeState(Jumping);
        }else{
            if (agent.body.getLinearVelocity().x != 0)
                agent.stateMachine.changeState(Walking);
        }
    }
},

Walking() {
    @Override
    public void update(PlayerAgent agent) {
        agent.moveOnGround();
        if(!agent.isTouchingGround) {
            if (agent.body.getLinearVelocity().y < -0.05)
                agent.stateMachine.changeState(Falling);
            else
                agent.stateMachine.changeState(Jumping);
        }else{
            if (agent.body.getLinearVelocity().x == 0)
                agent.stateMachine.changeState(Idle);
        }
    }
},

Jumping() {
    @Override
    public void enter(PlayerAgent agent) {
    }

    @Override
    public void update(PlayerAgent agent) {
        agent.moveOnAir();
        if (agent.body.getLinearVelocity().y < 0)
            agent.stateMachine.changeState(Falling);
        /* else if (agent.jumpOnAir())
            agent.stateMachine.changeState(DoubleJumping);*/
    }
},

DoubleJumping () {
    @Override
    public void update(PlayerAgent agent) {
        agent.moveOnAir();
        if (agent.body.getLinearVelocity().y < 0)
            agent.stateMachine.changeState(Falling);
    }
},

Falling() {

    @Override
    public void update(PlayerAgent agent) {
        agent.moveOnAir();
        if (agent.isTouchingGround) {
            agent.stateMachine.changeState(Idle);
        } else {
            if (agent.stateMachine.getPreviousState() != DoubleJumping) {
                if (agent.jumpOnAir())
                    agent.stateMachine.changeState(DoubleJumping);
            }
        }
    }
};

@Override
public void enter(PlayerAgent agent) {
    // System.out.println(this.toString());
}

@Override
public void update(PlayerAgent agent) {

}

@Override
public void exit(PlayerAgent agent) {
    agent.timer = 0.0f;
}

@Override
public boolean onMessage(PlayerAgent agent, Telegram telegram) {
    return false;
}
}

Player Animations Enum

But I'll need at least this states for player animation:

public enum PlayerAnimations {

 Idle, Walking, Jumping, DoubleJumping, Falling, Attack, JumpAttack, FallingAttack, FallAttack, Hit, Die;

}

And many more has u can see on this packed texture:
Player Animations Atlas

PlayerAgent Class:

public class PlayerAgent implements Updateable {

    private Entity player;

    protected Body body;
    private TransformComponent transform;
    SensorCollisionComponent sensors;

    protected static StateMachine  stateMachine;

    public boolean isTouchingGround = true;
    public boolean isTouchingWallLeft = false;
    public boolean isTouchingWallRight = false;

    public static float timer = 0.0f;

    public PlayerAgent(Entity player) {
        this.player = player;
        body = player.getComponent(B2dBodyComponent.class).body;
        transform = player.getComponent(TransformComponent.class);
        sensors = player.getComponent(SensorCollisionComponent.class);

        stateMachine = new DefaultStateMachine(this, PlayerState.Idle);
    }

    @Override
    public void update(float deltaTime) {
        isTouchingGround = (sensors.numFoot > 0);
        isTouchingWallLeft = (sensors.numLeftWall > 0);
        isTouchingWallRight = (sensors.numRightWall > 0);

        stateMachine.update();

        if (!KeyboardController.left && !KeyboardController.right)
            body.setLinearVelocity(MathUtils.lerp(body.getLinearVelocity().x, 0, 0.2f), body.getLinearVelocity().y);

    }


    public static PlayerState getCurrentState(){
        return stateMachine.getCurrentState();
    }
    public static PlayerState getLastState(){
        return stateMachine.getPreviousState();
    }
    public static boolean isInState(PlayerState state){
        return stateMachine.isInState(state);
    }

    public boolean moveOnGround() {
        if (KeyboardController.left) {
            body.setLinearVelocity(MathUtils.lerp(body.getLinearVelocity().x, -3f, 0.1f), body.getLinearVelocity().y);
            transform.flipX = true;
        }
        if (KeyboardController.right){
            body.setLinearVelocity(MathUtils.lerp(body.getLinearVelocity().x, 3f, 0.1f), body.getLinearVelocity().y);
            transform.flipX = false;
        }
        if (KeyboardController.up) {
            body.applyLinearImpulse(0, 2.7f, body.getWorldCenter().x, body.getWorldCenter().y, true);
            KeyboardController.up = false;
        }
            return (KeyboardController.left || KeyboardController.right);
    }

    public boolean moveOnAir(){
        if (KeyboardController.left){
            body.setLinearVelocity(MathUtils.lerp(body.getLinearVelocity().x, -1.5f, 0.1f), body.getLinearVelocity().y);
            transform.flipX = true;
        }if (KeyboardController.right){
            transform.flipX = false;
            body.setLinearVelocity(MathUtils.lerp(body.getLinearVelocity().x, 1.5f, 0.1f), body.getLinearVelocity().y);
        }
            return (KeyboardController.left || KeyboardController.right);
    }

    public boolean jumpOnAir(){
        if (KeyboardController.up) {
            body.applyLinearImpulse(0, 2.5f, body.getWorldCenter().x, body.getWorldCenter().y, true);
            KeyboardController.up = false;
            return true;
        }
        return false;
    }

}

Animation Code

Code in the AnimationSystem that takes care of the player:

PlayerComponent pc = pm.get(entity);
                if (pc.attacking) {

                    switch (PlayerAgent.getCurrentState()) {
                        case Idle:
                        case Walking:
                            if(PlayerAgent.getLastState() == PlayerState.Falling) {
                                key = PlayerAnimations.FallAttack.ordinal();
                                if(ani.animations.get(key).isAnimationFinished(PlayerAgent.timer)) pc.attacking = false;
                            }else
                                key = PlayerAnimations.Attack.ordinal();
                            break;
                        case Jumping:
                        case DoubleJumping:
                            key = PlayerAnimations.JumpAttack.ordinal();
                            break;
                        case Falling:
                            key = PlayerAnimations.FallingAttack.ordinal();
                            break;
                        default:
                            key = PlayerAnimations.Idle.ordinal();
                            break;
                    }
                } else {
                    switch (PlayerAgent.getCurrentState()) {
                        case Idle:
                            key = PlayerAnimations.Idle.ordinal();
                            break;
                        case Walking:
                            key = PlayerAnimations.Walking.ordinal();
                            break;
                        case Jumping:
                            key = PlayerAnimations.Jumping.ordinal();
                            break;
                        case DoubleJumping:
                            key = PlayerAnimations.DoubleJumping.ordinal();
                            break;
                        case Falling:
                            key = PlayerAnimations.Falling.ordinal();
                            break;
                        default:
                            key = PlayerAnimations.Idle.ordinal();
                            break;
                    }

                }
                PlayerAgent.timer += deltaTime;
            }

I was thinking of having states inside a state like Grounded -> Idle, Walking.
But I still dont know how I can make the player AttackStates.

Thanks for replying.