Question: Othello Description: Write a program that will allow two players to play Othello. The program should prompt the player whose tum it is to select
Othello
Description:
Write a program that will allow two players to play Othello. The program should prompt the
player whose tum it is to select the square row and column on which to place their disc. The
program should determine if the player has made a legal move and prompt for a new choice if
the move is not legal. If the move is legal, the program should place the player's disc. The
program should then determine which of the opponent's discs to flip and do sodisplaying the
results. When the game is over, the program should declare a winner and display a score.
Review the rules for Othello.
Suggestion for Adding Graphics:
Save the Othello mat file to your current MATL.AB folder the folder in which you will write
your game program. Try out the following commands in the command window to understand
how they work. Then incorporate them into your game program.
load Othello
& Loads Board Bx cell array a whitedisc, and a blackdisc
Board ; Board :
& Shows the initial board rovg and coluans with the initial play set up
Note: If you dock the figure
by clicking on the arrow, it
will stay on the screen the
entire time for viewing.
The command:
figureWindowStyle'docked'
works also.
Digplaying Plaver moves:
Say, Black chooses Row and Column This is a legal move.
USE MATLAB
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
