Phase10/src/com/github/s7uxn37/phase10/Intelligence.java
/**
     * Adds a card to the stack it was moved to
     * @param c The card that was moved
     * @param m The move the card was subject to
     */
Adds a card to the stack it was moved to
@param c The card that was moved
@param m The move the card was subject to
Adds a card to the stack it was moved to @param c The card that was moved @param m The move the card was subject to
private void handleTo(Card c, Move m) {
        int opponentIndex = -1;
        switch (m.to) {
            case FACE_DOWN: 
                faceDown.add(new Card());
                log(
                        "unknown card added to face down"
                );
                break;
            case FACE_UP:
                faceUp.add(0, c);
                log(
                        "card added to face up"
                );
                break;
            case SELF: 
                player.add(c);
                log(
                        "card added to player"
                );
                break;
            case PLAYER_1:
                opponentIndex = 0;
                break;
            case PLAYER_2:
                opponentIndex = 1;
                break;
            case PLAYER_3:
                opponentIndex = 2;
                break;
            case PLAYER_4:
                opponentIndex = 3;
                break;
            case PLAYER_5:
                opponentIndex = 4;
                break;
            default:
                break;
        }
        if (opponentIndex != -1) {
            opponents[opponentIndex].add(c);
            log(
                    "unknown card added to opponent[%1$d]", opponentIndex
            );
        }
    }
private void handleTo ( Card c , Move m ) { int opponentIndex = - 1 ; switch ( m . to ) { case FACE_DOWN : faceDown . add ( new Card ( ) ) ; log ( "unknown card added to face down" ) ; break ; case FACE_UP : faceUp . add ( 0 , c ) ; log ( "card added to face up" ) ; break ; case SELF : player . add ( c ) ; log ( "card added to player" ) ; break ; case PLAYER_1 : opponentIndex = 0 ; break ; case PLAYER_2 : opponentIndex = 1 ; break ; case PLAYER_3 : opponentIndex = 2 ; break ; case PLAYER_4 : opponentIndex = 3 ; break ; case PLAYER_5 : opponentIndex = 4 ; break ; default : break ; } if ( opponentIndex != - 1 ) { opponents [ opponentIndex ] . add ( c ) ; log ( "unknown card added to opponent[%1$d]" , opponentIndex ) ; } }
Adds a card to the stack it was moved to
 @param c The card that was moved
 @param m The move the card was subject to
Adds a card to the stack it was moved to @param c The card that was moved @param m The move the card was subject to
// wtf, add new unknown card
 // all cards known
 // useless, but stops warnings ;)
