Package ee.ttu.cs.iti0011.iabb104231.k1.Renderer.Console

Examples of ee.ttu.cs.iti0011.iabb104231.k1.Renderer.Console.LineSeparator


  }
 
  public void render()
  {
    Board b = getBoard();
    LineSeparator l = new LineSeparator();
    Row r = new Row();
   
    l.render();
    r.render(cell(b.occupiedBy(1)), cell(b.occupiedBy(2)), cell(b.occupiedBy(3)));
    l.render();
    r.render(cell(b.occupiedBy(4)), cell(b.occupiedBy(5)), cell(b.occupiedBy(6)));
    l.render();
    r.render(cell(b.occupiedBy(7)), cell(b.occupiedBy(8)), cell(b.occupiedBy(9)));
    l.render();
  }
View Full Code Here


 
  public void render()
  {
    Board b = getBoard();
    LineSeparator l = new LineSeparator();
    Row r = new Row();
   
    l.render();
    r.render(cell(b.occupiedBy(1)), cell(b.occupiedBy(2)), cell(b.occupiedBy(3)));
    l.render();
    r.render(cell(b.occupiedBy(4)), cell(b.occupiedBy(5)), cell(b.occupiedBy(6)));
    l.render();
    r.render(cell(b.occupiedBy(7)), cell(b.occupiedBy(8)), cell(b.occupiedBy(9)));
    l.render();
  }
View Full Code Here

    b.addPlayer(ai1);
    b.addPlayer(ai2);
   
    // Here will create renderer - how the user will see the game.
    // For now the console version is implemented.
    ConsoleRenderer c = new ConsoleRenderer();
   
    // will set marks for users - first user will get X
    // the second one will get O
    // We can set what ever you want - only one char allowed
    c.setPlayerRenderingString(ai1, "o");
    c.setPlayerRenderingString(ai2, "-");
    b.setRenderer(c);
   
//    for(int i=1; i<10; i++) {
//      b.output(i + " : " + Long.toString(b.cellToByte(i).toLongArray()[0], 2));
//    }
View Full Code Here

TOP

Related Classes of ee.ttu.cs.iti0011.iabb104231.k1.Renderer.Console.LineSeparator

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.