perennialAutodidact / memory-snap

0 stars 0 forks source link

29 add points to player score when matching pair is removed #82

Closed russfraze closed 10 months ago

russfraze commented 10 months ago

## Description of changes Added and awardPoint helper which takes a the players array and the currentPlayer object. It maps over the players and returns the array with the current players score incremented. This helper is used in handle flipped pair reducer action to award a point in the case of a match. Unit tests for the helper are also included.

Test steps

Play the game and check that a point is awarded to the current player when a match is made.