Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A simple but lengthy program in c++. I am new to programming and find it a bit challenging to write this program. If anyone willing

A simple but lengthy program in c++. I am new to programming and find it a bit challenging to write this program. If anyone willing to help, and maybe write a few //comments so I can understand the code myself. The guidelines should be pretty clear.

image text in transcribed

image text in transcribed

image text in transcribed

Othello is a game touted as a minute to learn, a lifetime to master." The game is played by 2 people (one who chooses black and one who chooses white) on a board containing 61 squares. The game also uses 6 disks which are white on one side and black on the other. The two players take turns placing disks with their color side up. When a player places a disk which outflanks the opponents color, the opponents disks are flipped. The object of the game is to outflank your opponent and flip your opponent's disks to your color, ending up with the majority of disks on the board in your color. Outflank means to place a disk so that you have a disk of your color at each end of an opponent's row, column, or diagonally in line with of disks of his color For this programa, you will be given a board with both black and white disks already placed on it. You need find the best location to place another white disk, as well as the score (white disks black disks) that will be result. For example, white disk A is already in place on the board. By the placement of white disk B, the black row of disks has been outflanked Figure 1: Before and after a flip by placing disk B A disk may outflank any number of opposing disks in one or more rows. (A row may be one disk or many disks in a straight line. A disk may outflank in any direction: horizontal, vertical, diagonal, forward or backward. A disk may outflank in any number of directions at the same time. (Theoretically, it is possible to flip in up to 8 directions at once.) DISKS MAY ONLY BE FLIPPED AS A DIRECT RESULT OF A MOVE Input The first line of input begins with two positive integers n and m, 0 n m

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

Databases And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

More Books

Students also viewed these Databases questions