Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Done in MATLAB Othello.mat file: https://app.box.com/embed/s/aw1ncpaw6fpfttbgaf5sm6fd9rloc0t6?view=list&sortColumn=name&sortDirection=ASC&showItemFeedActions=true&showParentPath=true Othello Description Write a program that will allow two players to play Othello. The program should prompt the player

Done in MATLAB

Othello.mat file: https://app.box.com/embed/s/aw1ncpaw6fpfttbgaf5sm6fd9rloc0t6?view=list&sortColumn=name&sortDirection=ASC&showItemFeedActions=true&showParentPath=true

image text in transcribed

image text in transcribed

Othello Description Write a program that will allow two players to play Othello. The program should prompt the player whose turn 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 so displaying the results. When the game is over, the program Review the rules for Othello should declare a winner and display a score Suggestion for Adding Graphics: Save the Othello.mat file to your current MATLAB 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 incorpo rate them into your game program. load Othello % Load3 Board (8x8 cell array), a whitedisc, and a blackd13c imshow ([Boardf1,Boardt2,Boardi3,Boardf4,:Boardi5, :Boardi6,:; Boardi7, ::Boardi8,:1) % shows the initial board (8 row, and 8 column3 ) with the initial play 3et up Figure 1 file Edi Yiew set Iools Dektop Window Help al Note: If you dock the figure by clicking on the arrow, it will stay on the screen the entire time for viewing The command: figure(WindowStyle','docked) works also Say, Black chooses Row 4 and Column 3. This is a legal move. Othello Description Write a program that will allow two players to play Othello. The program should prompt the player whose turn 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 so displaying the results. When the game is over, the program Review the rules for Othello should declare a winner and display a score Suggestion for Adding Graphics: Save the Othello.mat file to your current MATLAB 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 incorpo rate them into your game program. load Othello % Load3 Board (8x8 cell array), a whitedisc, and a blackd13c imshow ([Boardf1,Boardt2,Boardi3,Boardf4,:Boardi5, :Boardi6,:; Boardi7, ::Boardi8,:1) % shows the initial board (8 row, and 8 column3 ) with the initial play 3et up Figure 1 file Edi Yiew set Iools Dektop Window Help al Note: If you dock the figure by clicking on the arrow, it will stay on the screen the entire time for viewing The command: figure(WindowStyle','docked) works also Say, Black chooses Row 4 and Column 3. This is a legal move

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2019 Wurzburg Germany September 16 20 2019 Proceedings Part 2 Lnai 11907

Authors: Ulf Brefeld ,Elisa Fromont ,Andreas Hotho ,Arno Knobbe ,Marloes Maathuis ,Celine Robardet

1st Edition

3030461467, 978-3030461461

More Books

Students also viewed these Databases questions

Question

What is job description ? State the uses of job description.

Answered: 1 week ago

Question

What are the objectives of job evaluation ?

Answered: 1 week ago

Question

Write a note on job design.

Answered: 1 week ago

Question

Compute the derivative of f(x)cos(-4/5x)

Answered: 1 week ago