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 are the best collages for architectural learning?
Sati [7]

Answer:

I don't where you live, but I named few around the world. Some are Virgi..nia Tech, Unive..rsity of Flor..dia, and Oklah..oma Stat..e Univ..ersity.

4 0
2 years ago
A cartridge electrical heater is shaped as a cylinder of length L=200mm and outer diameter D=20 mm. Under normal operating condi
lara31 [8.8K]

Answer:

T(water)=50.32℃

T(air)=3052.6℃

Explanation:

Hello!

To solve this problem we must use the equation that defines the transfer of heat by convection, which consists of the transport of heat through fluids in this case water and air.

The equation is as follows!

Q=ha(Ts-T\alpha )

Q = heat

h = heat transfer coefficient

Ts = surface temperature

T = fluid temperature

a = heat transfer area

The surface area of ​​a cylinder is calculated as follows

a=\pi D(\frac{D}{2} +L)

Where

D=diameter=20mm=0.02m

L=leght=200mm)0.2m

solving

a=\pi (0.02)(\frac{0.02}{2} +0.2)=0.01319m^2

For water

Q=2Kw=2000W

h=5000W/m2K

a=0.01319m^2

Tα=20C

Q=ha(Ts-T\alpha )

solving for ts

Ts=T\alpha +\frac{Q}{ha}

Ts=20+\frac{2000}{(0.01319)(5000)} =50.32C

for air

Q=2Kw=2000W

h=50W/m2K

a=0.01319m^2

Tα=20C

Ts=20+\frac{2000}{(0.01319)(50)}=3052.6C

3 0
3 years ago
Describe ICP/OES in detail.
alex41 [277]

Answer:

ICP -OES stand for inductively coupled plasma optical emission spectroscopy

Explanation:

It is techniques that known as trace level technique which help to identify and quantify the element present in sample by using spectra emission.

The analysis process include desolvates, ionization and excitation of the sample. The sample is identify by analyzing the emission line from it and quantify by analyzing the intensity of same emission lines.

7 0
3 years ago
Read 2 more answers
2.) A fluid moves in a steady manner between two sections in a flow
Talja [164]

Answer:

250\ \text{lbm/min}

625\ \text{ft/min}

Explanation:

A_1 = Area of section 1 = 10\ \text{ft}^2

V_1 = Velocity of water at section 1 = 100 ft/min

v_1 = Specific volume at section 1 = 4\ \text{ft}^3/\text{lbm}

\rho = Density of fluid = 0.2\ \text{lb/ft}^3

A_2 = Area of section 2 = 2\ \text{ft}^2

Mass flow rate is given by

m=\rho A_1V_1=\dfrac{A_1V_1}{v_1}\\\Rightarrow m=\dfrac{10\times 100}{4}\\\Rightarrow m=250\ \text{lbm/min}

The mass flow rate through the pipe is 250\ \text{lbm/min}

As the mass flowing through the pipe is conserved we know that the mass flow rate at section 2 will be the same as section 1

m=\rho A_2V_2\\\Rightarrow V_2=\dfrac{m}{\rho A_2}\\\Rightarrow V_2=\dfrac{250}{0.2\times 2}\\\Rightarrow V_2=625\ \text{ft/min}

The speed at section 2 is 625\ \text{ft/min}.

3 0
3 years ago
Air-conditioners consume a significant amount of electrical energy in buildings. Split air conditioner is a unitary system where
nydimaria [60]

Answer:

Evaporator,Compressor,Condensor ,Expanding valve

Explanation:

Split air conditioning :

  Split air conditioning means that, condensor unit or some time called outdoor unit is split from evaporator.It means that evaporator and condensor are placed at some distance.

The four component of split air conditioning system are as follows

1.Evaporator

 It absorb heat from room and produces the cooling effect.

2.Compressor

 It compresses the refrigerant which exits from evaporator.

3.Condensor

 It rejects the heat and cool the evaporator.

4.Expanding valve

  It allows to refrigerant to cool up to evaporator pressure.

6 0
3 years ago
Other questions:
  • Air is cooled and dehumidified as it flows over the coils of refrigeration system at 100 kPa from 30 ºC and relative humidityof
    14·1 answer
  • What are some possible reasons for the sudden development of the cell theory
    14·1 answer
  • What do you need for an object to fly?
    10·1 answer
  • Design an Armstrong indirect FM modulator to generate an FM signal with a carrier frequency 98.1 MHz and a frequency deviation △
    15·1 answer
  • A Carnot engine is operated between two heat reservoirs at temperatures of 520 K and 300 K. It receives heat from the 520 K rese
    8·1 answer
  • Simplify the following expressions, then implement them using digital logic gates. (a) f = A + AB + AC (b) f = AB + AC + BC (c)
    5·1 answer
  • Has anyone lost faith in humanity ✌️
    7·1 answer
  • W
    7·1 answer
  • The pressure less than atmospheric pressure is known as:
    6·1 answer
  • Which of the following is a Dashboard Scoreboard for alignment of the business where information is constantly flowing through t
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!