Question: In swift(Xcode), Write the code Word Guessing Game . We need two players to play the game. Here are some of the rules to play
In swift(Xcode), Write the code "Word Guessing Game" . We need two players to play the game. Here are some of the rules to play the game and some hints to write code
- The player takes turn to play the game
- We start with player 1, when one round is finished (either player 1 guessed the word correct or incorrect), we start new round and player 2 will guess the word
- Each player has equal number of words to guess
- When the words are running out, use Alert to indicate the winner
- For the UI (Main.storyboard), you can just add a label to indicate which player is currently playing. Or you like to add more view/control to enhance the UI.
- The logic for single player is working. For the 2nd player, you can just add another set of variables and call them in your function. Or if you have new ideas, you can implement them, as long as they are working.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
