-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
The state that is displayed is simply the board obtain after the call `Game.create().board` This version not final, we need to bind this to a real `Match` and some refactoring is needed to be readable
- Create 2 new nested functions to make the code more pleasant to read : - `getModelPath` - `getModelColor` - Remove some unnecessary variable - Correct null check to be more kotlin like
…R chess When the constructor is called, the class load the board and the peices depending on the game state.
- At creation, the root node shouldn't be null - When we scale the whole scene, the root node should have the correct scale vector
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, and it's great that the coverage is above 80%.
I feel like there's a small violation of the MVVM pattern though - the view should not use a Game
directly, since it's a Model object; instead, I think the approach should be similar to the one used in the 2d chessboard. I was thinking we may make a refactoring of the ChessBoardState
in the next sprint so we can extract the common logic for loading / managing the game state between the 2d and 3d boards. What are your thoughts on this ?
mobile/src/androidTest/java/ch/epfl/sdp/mobile/test/ui/ar/ChessSceneTest.kt
Outdated
Show resolved
Hide resolved
A few things to change, but looks pretty good! It's awesome that you managed to bring the coverage above 80%! |
…sSceneTest.kt Co-authored-by: Matthieu Burguburu <36692720+matt989253@users.noreply.github.com>
It used to distinguish between engine position and Ar position
Code Climate has analyzed commit 0650f5c and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 81.1% (80% is the threshold). This pull request will bring the total coverage in the repository to 96.8% (1.3% change). View more on Code Climate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This PR change the AR display, we can now display a board with pieces with colour.
Big changes :
smooth
to move an object from a point A to BThis PR also centralize the graphic content into one place.
Next step :
For the moment, the scene only display a static board. We need some modification to be able to update the AR game with the incoming new state. We need to add a listener that will change one piece position to the new location. To do that, we have 2 possibility :
Possible Enhancement :