mirror of
https://github.com/FranP-code/Hangman-game-with-React.git
synced 2025-10-13 00:42:32 +00:00
Game Logic done
This commit is contained in:
8
src/General Scripts/checkDefeat.js
Normal file
8
src/General Scripts/checkDefeat.js
Normal file
@@ -0,0 +1,8 @@
|
||||
const checkDefeat = (setEndOfGame, hangmanFrame) => {
|
||||
|
||||
if (hangmanFrame >= 5) {
|
||||
setEndOfGame('Defeat')
|
||||
}
|
||||
}
|
||||
|
||||
export default checkDefeat
|
||||
Reference in New Issue
Block a user