- Simple data class that conists of
idx
,number
idx
determines the place in the layoutnumber
determines the image of the front side
- Check
matching
when put two cards in it - Internally checks whether
number
is the same whileidx
is different
- Data class to save the state of MahjongCard
- Consists of three variables:
rotatedState
,blurred
,clickable
- When two cards are put to the card matcher,
if matching, card becomesblurred
andnot clickable
, if not matching, justrotated
again.
- Separated the state and the layout (
MahjongCardState
-MahjongCard
) - Applied rotation, alpha animation using
graphics layer