Question: How would you code this in matlab 1. We start the game on a fun note, with a happy greeting to the players telling them
1. We start the game on a fun note, with a happy greeting to the players telling them who wrote the program 2. The first part of the program is a coin toss to decide who goes first. 3. Use a block of text to explain what the rules are to the players. 4. Place a pause in your program so that the user can read before moving on. 5. Start with an empty board to show to the user using a function called boardplot 6. Ask Player 1 for their choice on the board 7. Use boardplot to plot Player 1' s marker on the board. 8. Use a checkwin function to check if Player has won 9. Ask Player 2 for their choice on the board 10. Use boardplot to plot Player 2's marker on the board 11. Use a checkwin function to check if Player 2 has won. 12. Repeat steps 6 11 until the board is full or someone has won 13. At the end of the game, display who won if anyone did)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
