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

Board #8

Merged
merged 18 commits into from
Aug 19, 2017
Merged

Board #8

merged 18 commits into from
Aug 19, 2017

Conversation

MENZI-MCHUNU
Copy link
Contributor

@MENZI-MCHUNU MENZI-MCHUNU commented Aug 15, 2017

what else is required on my side for the board view e,g functionality that i left out?

@coveralls
Copy link

Coverage Status

Coverage remained the same at 0.0% when pulling 8e476f6 on board into 3b7a5f3 on master.

@vapour101
Copy link
Owner

@MENZI-MCHUNU
Okay, the main file you need to be working with is BoardController
A lot of the work has already been done, essentially there's a canvas element that the board will be drawn on, I've already set it up to auto-resize itself if the window is resized, what you need to do is:

  1. write the drawBoardLines() function to draw the lines on the board
  2. write the drawStones() function to draw the stones at the correct places, you can get a list of all the black stones coordinates by calling board.getBlackStones() and the same works for the white stones with board.getWhiteStones()
  3. finish the canvasClicked method so that when the board is clicked, you find the coordinates of the place that was clicked then call board.playBlackStone or board.playWhiteStone as necessary and then call drawBoard().

@vapour101 vapour101 merged commit 898d4f3 into master Aug 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants