Skip to content
This repository has been archived by the owner on Nov 29, 2017. It is now read-only.

Commit

Permalink
Implemented Line Textures
Browse files Browse the repository at this point in the history
  • Loading branch information
vapour101 committed Sep 15, 2017
1 parent 1063d05 commit a6b21cf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/ui/controller/LocalGameController.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ GameDrawer buildGameDrawer() {
drawer.setStoneDrawer(stoneDrawer);

Image wood = new Image("/wood.jpg", false);
Image lines = new Image("/grid.png", false);

BoardDrawer boardDrawer = new TexturedBoardDrawer(boardCanvas, wood, true);
BoardDrawer boardDrawer = new TexturedBoardDrawer(boardCanvas, wood, lines);
drawer.setBoardDrawer(boardDrawer);

return drawer;
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/ui/drawer/TexturedBoardDrawer.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ private TexturedBoardDrawer(Canvas canvas, Image backgroundTexture, Image lineTe
simpleLines = useSimpleLines;
}

public TexturedBoardDrawer(Canvas canvas, Image backgroundTexture, Image lineTexture) {
this(canvas, backgroundTexture, lineTexture, false);
}

@Override
public void drawBackground() {
if ( background == null )
Expand Down
Binary file added src/main/resources/grid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a6b21cf

Please sign in to comment.