-
Notifications
You must be signed in to change notification settings - Fork 2
Refactor AR Screen to not destroy all pieces' node #391
Conversation
Only display the starting baord
Still need to be clean and update tests
Remove tests that are now irrevelant
…oid into refactor/cyk/update_pieces
The default value seems not enough for the CI
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.
Since ArGameScreenState
and ChessBoardState
share a lot of functionality and implementation, we should probably use ChessBoardState
in the StatefulArScreen
.
mobile/src/main/java/ch/epfl/sdp/mobile/ui/game/ar/ChessScene.kt
Outdated
Show resolved
Hide resolved
Move the decleration insize the scope, that allow use to remove the null check
Co-authored-by: Alexandre Piveteau <[email protected]>
…oid into refactor/cyk/update_pieces
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, thanks !
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.
Great work! Just a few documentation typos and suggestions to follow our documentation convention, but overall looks great!
mobile/src/main/java/ch/epfl/sdp/mobile/ui/game/ar/ChessScene.kt
Outdated
Show resolved
Hide resolved
mobile/src/main/java/ch/epfl/sdp/mobile/ui/game/ar/ChessScene.kt
Outdated
Show resolved
Hide resolved
mobile/src/main/java/ch/epfl/sdp/mobile/ui/game/ar/ChessScene.kt
Outdated
Show resolved
Hide resolved
mobile/src/main/java/ch/epfl/sdp/mobile/ui/game/ar/ChessScene.kt
Outdated
Show resolved
Hide resolved
mobile/src/main/java/ch/epfl/sdp/mobile/ui/game/ar/ChessScene.kt
Outdated
Show resolved
Hide resolved
mobile/src/main/java/ch/epfl/sdp/mobile/ui/game/ar/ArChessBoardScreen.kt
Outdated
Show resolved
Hide resolved
mobile/src/androidTest/java/ch/epfl/sdp/mobile/test/ui/game/ar/ChessSceneTest.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: Fouad-sys <[email protected]>
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.
Thanks!
Code Climate has analyzed commit c28d57f and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 83.3% (80% is the threshold). This pull request will bring the total coverage in the repository to 96.7% (0.2% change). View more on Code Climate. |
Refactor the AR scene to not destroy the piece's nodes at each update.
In this refactor, we integrate the AR screen with the new delegate introduced in #331
The update function takes the current a list of piece present on the board (from the state) and compare with the local version to update (move, delete, add piece for the promotion) the view.
This refactor produces the same behaviour that what we have in the main branch.
Some line cannot be tested because it required to create a screen, and we still have the bug #213.
This code still have a problem for the future issue #369, for some reason we cannot call
smooth
which is used to animate the 3D model. (Need more investigation)Closes #284, Closes #377