public static Move getMove(ChessBoard board, String san) throws Exception {
    	
        char c = san.charAt(0);
        CoinColor color = board.getCurrentPlayerColor();
        boolean promote = false;
        if (c != 'K' && c != 'Q' && c != 'R' && c != 'B' && c != 'N' && c != 'O') {
            c = 'P';
            if (san.contains("=")) {
                promote = true;
            }
        } else if (c == 'O') {
            if (san.equals("O-O")) {
                return new KingSideCastling(board.getCoinAt(Castling.getKingPosition(color)),
                        board.getCoinAt(KingSideCastling.getRookPosition(color)),
                        Castling.getKingPosition(color),
                        KingSideCastling.getKingEndingPosition(color),
                        color);
            } else {
                return new QueenSideCastling(board.getCoinAt(Castling.getKingPosition(color)),
                        board.getCoinAt(QueenSideCastling.getRookPosition(color)),
                        Castling.getKingPosition(color),
                        QueenSideCastling.getKingEndingPosition(color),
                        color);
            }
        }

        if (san.contains("-") || san.contains("*")) {
            return null;
        }
        Position end = Position.getSAN_EndPosition(san);
        Iterator<Coin> it = board.getCoinIterator();
        LinkedList<Coin> v = new LinkedList<Coin>();
        Coin coin;
        while (it.hasNext()) {
            coin = it.next();
            if (coin.getColor() == color && coin.getNotation() == c) {
                if (coin.isHasMoveToPosition(end, board)) {
                    v.add(coin);
                }
            }
        }
        coin = getCorrectCoin(board, san, v);


        if (c == 'P') {
            if (promote) {
                return new Promote(board, coin.getPosition(), end, Promote.getOption(san.charAt(san.indexOf('=') + 1)), color);
            }
           // Iterator<Move> m = coin.getPossibleMoves(board).iterator();
            if (coin.getPosition().getFile() != end.getFile() && board.getCoinAt(end) == Coin.Empty) {
                return new Enpassant(board, coin.getPosition(), end);
            }
        }
        return new StandardMove(board, coin.getPosition(), end);
    }