Package ch.bfh.jass.game

Examples of ch.bfh.jass.game.Game


    }

    @Test
    public void testDifferentHands() throws PlayerAlreadyInGameException, PlaceTakenException, PlaceDoesNotExistException, YouMustNotException {
        Collection<Card> handCards = new ArrayList<Card>();
        Game jass = new Game(this.player1);
        jass.addPlayer(this.player2, 1);
        jass.addPlayer(this.player3, 2);
        jass.addPlayer(this.player4, 3);

        jass.start(this.player1);

        for (IPlayer player : jass.getPlayers()) {
            handCards.addAll(player.getHandCards());
        }

        Assert.assertEquals(36, handCards.size());
        for (Card checkCard : handCards) {
View Full Code Here


    public String newGame() {
        if (this.game != null) {
            MessageFactory.error("alreadyInAGame");
        } else {
            try {
                this.game = new Game(this.player);
                this.entityManager.addGame(this.game);
                this.hasPlace = true;
                this.gameAdmin = true;
            } catch (PlayerAlreadyInGameException ex) {
                MessageFactory.error("playerAlreadyInGame");
View Full Code Here

TOP

Related Classes of ch.bfh.jass.game.Game

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.