Package match.event

Examples of match.event.AssignYellowCardEvent


    public Event execute(Match match) {
        MatchState state = match.getState();
        if (state != MatchState.started)
            throw new IllegalStateException(state.toString());

        AssignYellowCardEvent assignYellowCardEvent = new AssignYellowCardEvent(this.getPlayerModel());

        if (hasYellowCard(match)) {
            Event redCardEvent = assignRedCard(match);
            assignYellowCardEvent.setSucceedingEvent(redCardEvent);
            match.addAssignedRedCard(playerModel);
        }
        match.addAssignedYellowCard(playerModel);

        return assignYellowCardEvent;
View Full Code Here

TOP

Related Classes of match.event.AssignYellowCardEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.