Package com.sirenian.hellbound.domain.glyph

Examples of com.sirenian.hellbound.domain.glyph.LivingGlyph


    }

    public LivingGlyph nextGlyph(CollisionDetector detector, ListenerSet glyphListeners) {
        GlyphType glyphType = GlyphType.ALL_LIVING[random.nextInt(GlyphType.ALL_LIVING.length)];
        Logger.debug(this, "Creating next glyph, glyph type is " + glyphType);
        LivingGlyph glyph = new LivingGlyph(glyphType, detector, CenterCalculator.forWidth(width));
        glyph.addListeners(glyphListeners);
    return glyph;
    }
View Full Code Here


    Mock glyphFactoryMock = mock(GlyphFactory.class);
    Mock glyphListener = mock(GlyphListener.class);
   
    glyphFactoryMock.expects("nextGlyph")
            .with(new Matcher[] {isA(CollisionDetector.class), isA(ListenerSet.class)})
                .will(returnValue(new LivingGlyph(GlyphType.T, CollisionDetector.NULL, 4)));
   
    Game game = new Game((GlyphFactory) glyphFactoryMock, heartbeat, 7, 13);
    game.addGlyphListener((GlyphListener)glyphListener);
    game.requestStartGame();
   
View Full Code Here

        // Given...
       
        StubHeartbeat heartbeat = new StubHeartbeat();
        Mock glyphFactoryMock = mock(GlyphFactory.class);
       
        LivingGlyph firstGlyph = new LivingGlyph(GlyphType.T, new StubCollisionDetector(13), 3);
        LivingGlyph secondGlyph = new LivingGlyph(GlyphType.S, CollisionDetector.NULL, 3);
        Junk junk = new Junk(7, 13);
       
        glyphFactoryMock.expects("nextGlyph").inOrder()
            .with(new Matcher[] {isA(CollisionDetector.class), isA(ListenerSet.class)})
            .will(returnValue(firstGlyph), returnValue(secondGlyph));
View Full Code Here

        ListenerSet listenerSet = new ListenerSet();
        Mock listener = mock(GlyphListener.class);
        listenerSet.addListener((Listener) listener);
       
        PseudoRandomGlyphFactory factory = new PseudoRandomGlyphFactory(42, 7, 13);
        LivingGlyph glyph = factory.nextGlyph(CollisionDetector.NULL, listenerSet);
        Junk junk = factory.createJunk(listenerSet);
       
        listener.expects("reportGlyphMovement").times(2); // once for junk change, once for glyph change
       
        junk.absorb(glyph);
View Full Code Here

TOP

Related Classes of com.sirenian.hellbound.domain.glyph.LivingGlyph

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.