Package com.lunivore.gameoflife.view.string

Examples of com.lunivore.gameoflife.view.string.StringRenderer.asString()


    public void shouldAllowUsersToToggleCells() {
        StringRenderer renderer = new StringRenderer();
        Game game = new Game(6, 4);
        game.setObserver(renderer);
        game.toggleCellAt(2, 1);
        assertThat(renderer.asString(), Matchers.equalTo(
        "......" + NL +
        "..X..." + NL +
        "......" + NL +
        "......"));
        game.toggleCellAt(2, 2);
View Full Code Here


        "......" + NL +
        "..X..." + NL +
        "......" + NL +
        "......"));
        game.toggleCellAt(2, 2);
        assertThat(renderer.asString(), Matchers.equalTo(
        "......" + NL +
        "..X..." + NL +
        "..X..." + NL +
        "......"));
        game.toggleCellAt(2, 1);
View Full Code Here

        "......" + NL +
        "..X..." + NL +
        "..X..." + NL +
        "......"));
        game.toggleCellAt(2, 1);
        assertThat(renderer.asString(), Matchers.equalTo(
        "......" + NL +
        "......" + NL +
        "..X..." + NL +
        "......"));
    }
View Full Code Here

    @Test
    public void shouldStartEmpty() {
        StringRenderer renderer = new StringRenderer();
        Game game = new Game(6, 4);
        game.setObserver(renderer);
        assertThat(renderer.asString(), Matchers.equalTo(
        "......" + NL +
        "......" + NL +
        "......" + NL +
        "......"));
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.