Files
ChessHub/frontend
Moon Patel 59af2e756a refactored reducer function in chess-game-context.sx
The reducer function in chess-game-context.jsx previously accepted two different action types MOVE_PIECE and
CAPTURE_PIECE. Due to this the caller has to verify whether a move is a simple move or a capture. Since, the dispatch
was called in multilpe places, it is better to keep one action type MOVE_PIECE and move the differentiating logic
to the reducer. Also this commit implements a playAudioCallback which receives an action string and plays an audio
accordingly. This is passed to the dispatch function and it is the responsibility of the reducer to call it with
an appropriate action.
2023-10-20 16:55:03 +05:30
..
2023-10-15 02:27:37 +05:30
2023-07-15 16:43:37 +05:30
2023-07-25 18:52:36 +05:30
2023-07-25 18:52:36 +05:30
2023-07-03 01:12:47 +05:30
2023-09-18 12:51:56 +05:30
2023-10-15 02:27:37 +05:30
2023-07-26 18:43:26 +05:30
2023-07-26 18:43:26 +05:30
2023-07-26 18:43:26 +05:30
2023-07-26 18:43:26 +05:30