1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sliva [168]
3 years ago
7

Write a class named FBoard for playing a game, where player x is trying to get her piece to row 7 and player o is trying to make

it so player x doesn't have any legal moves. It should have: An 8x8 array of char for tracking the positions of the pieces.A data member called gameState that holds one of the following values: X_WON, O_WON, or UNFINISHED - use an enum type for this, not string (the enum definition should go in Board.hpp, before the class, not inside it).Data members to keep track of where the x piece is.A default constructor that initializes the array to empty (you can use whatever character you want to represent empty). It should then put four o pieces on row 7, in columns 0, 2, 4, and 6. It should put an x piece on row 0, column 3. It should also initialize the other data members.A method called getGameState that just returns the value of gameState.A method called moveX that takes as parameters the row and column of the square to move to. If the desired move is not allowed, or if the game has already been won, it should just return false. Otherwise it should make the move and return true. A piece belonging to x can move 1 square diagonally in any direction. A piece is not allowed to move off the board or to an occupied square. If x's move gets her piece to row 7, gameState should be set to X_WON.A method called moveO that takes as parameters the row and column to move from, and the row and column to move to. If the first pair of coordinates doesn't hold o's piece, or if the desired move is not allowed, or if the game has already been won, it should just return false. Othewise it should make the move and return true. A piece belonging to o can move 1 square diagonally, but the row cannot increase, so any o piece has at most two available moves. For example, if player o has a piece at (5, 2), it could move to (4, 1) or (4, 3), but not (6, 1) or (6, 3). It is not allowed to move off the board or to an occupied square. If o's move leaves no legal move for x, gameState should be set to O_WON.You do not need to track whose turn it is. Either move method can be called multiple times in a row. It doesn't matter which index of the array you consider the row and which you consider the column as long as you're consistent.Feel free to add private helper functions if you want. You may also find it useful to add a public print function to help with debugging.Do not access the array out of bounds. Make sure values are in bounds before using them to index into the array.
Engineering
1 answer:
OverLord2011 [107]3 years ago
7 0

Answer:

12345=V

Explanation:

You might be interested in
What is the function maintenance? List some important steps for vibration monitoring based maintenance.
Mrrafil [7]

The maintenance is in charge of controlling that all the machines of a company are constantly running in order to avoid damages that cause loss of money when the machines fail.

The maintenance based on vibration monitoring allows to predict failures in some rotating machines such as:

1. worn bearings

2.alignment

3.balance

4. affected gears

5. bent shafts

6. rocks

7.gags

8. eccentricity

9. failures of electrical origin

4 0
3 years ago
In a CNC machining operation, the has to be moved from point (5, 4) to point(7, 2)along a circular path with center at (7,2). Be
notka56 [123]

Answer: hello your question is incomplete below is the complete question

answer:

N010 GO2 X7.0 Y2.0 15.0 J2.0  ( option 1 )

Explanation:

Given that the NC machining has to be moved from point ( 5,4 ) to point ( 7,2 ) along a circular path

GO2 = circular interpolation in a clockwise path

G91 = incremental dimension

<em>hence the correct option is </em>:

N010 GO2 X7.0 Y2.0 15.0 J2.0  

6 0
3 years ago
Which of the following requirement statements is an example of a breakdown of the accuracy standard?
const2013 [10]

Answer:

<u>The automobile rental prices shall show all taxes (including a 6% state tax).</u>

Explanation:

Im pretty sure

4 0
3 years ago
Input signal to a controller is​
alexgriva [62]

Answer:

were the cord plugs in

Explanation:

4 0
3 years ago
A 03-series cylindrical roller bearing with inner ring rotating is required for an application in which the life requirement is
-BARSIC- [3]

Answer:

\mathbf{C_{10} = 137.611 \ kN}

Explanation:

From the information given:

Life requirement = 40 kh = 40 40 \times 10^{3} \ h

Speed (N) = 520 rev/min

Reliability goal (R_D) = 0.9

Radial load (F_D) = 2600 lbf

To find C10 value by using the formula:

C_{10}=F_D\times \pmatrix \dfrac{x_D}{x_o +(\theta-x_o) \bigg(In(\dfrac{1}{R_o}) \bigg)^{\dfrac{1}{b}}} \end {pmatrix} ^{^{^{\dfrac{1}{a}}

where;

x_D = \text{bearing life in million revolution} \\  \\ x_D = \dfrac{60 \times L_h \times N}{10^6} \\ \\ x_D = \dfrac{60 \times 40 \times 10^3 \times 520}{10^6}\\ \\ x_D = 1248 \text{ million revolutions}

\text{The cyclindrical roller bearing (a)}= \dfrac{10}{3}

The Weibull parameters include:

x_o = 0.02

(\theta - x_o) = 4.439

b= 1.483

∴

Using the above formula:

C_{10}=1.4\times 2600 \times \pmatrix \dfrac{1248}{0.02+(4.439) \bigg(In(\dfrac{1}{0.9}) \bigg)^{\dfrac{1}{1.483}}} \end {pmatrix} ^{^{^{\dfrac{1}{\dfrac{10}{3}}}

C_{10}=3640 \times \pmatrix \dfrac{1248}{0.02+(4.439) \bigg(In(\dfrac{1}{0.9}) \bigg)^{\dfrac{1}{1.483}}} \end {pmatrix} ^{^{^{\dfrac{3}{10}}

C_{10} = 3640 \times \bigg[\dfrac{1248}{0.9933481582}\bigg]^{\dfrac{3}{10}}

C_{10} = 30962.449 \ lbf

Recall that:

1 kN = 225 lbf

∴

C_{10} = \dfrac{30962.449}{225}

\mathbf{C_{10} = 137.611 \ kN}

7 0
3 years ago
Other questions:
  • A evolução da malha rodoviária do Brasil é um marco notável
    9·1 answer
  • 2. A fluid at 14.7 psi (lb-f per square inch) with kinematic viscosity (????????) 1.8 x10-4 ft2/sec and density(????????) 0.076
    11·1 answer
  • How can you evaluate whether the slope of the dependent variable with an independent variable is the same for each level of the
    13·1 answer
  • A water agency stated that waterlines cannot have water flowing faster than 8 ft/s. What is the minimum standard pipe diameter t
    12·1 answer
  • Draw the sequence of BSTs that results when you insert the keys E, A, S, Y, Q, U, E, S, T, I, O, N, in that order into an initia
    10·1 answer
  • An air-conditioning system operates at a total pressure of 1 atm and consists of a heating section and a humidifier that supplie
    15·1 answer
  • What is the standard deviation of the following data set:
    7·1 answer
  • A beam of span L meters simply supported by the ends, carries a central load W. The beam section is shown in figure. If the maxi
    5·1 answer
  • Which statement describes the relay between minerals and rocks ?
    15·1 answer
  • All of these are true about steel EXCEPT that:
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!