Game play: main game loop Provide a group of C++ classes that implements the main game loop…

Game play: main game
loop

Provide a group of C++
classes that implements the main game loop following the official rules of the
Warzone game. During the main game loop, proceeding in a round-robin fashion in
the order setup in startup phase 4b. The main game loop has three phases and is
implemented in a function/method named mainGameLoop() in the game engine:

1. Reinforcement Phase-Players are given a
number of armies that depends on the number of territories they own, (# of
territories owned divided by 3, rounded down). If the player owns all the
territories of an entire continent, the player is given a number of armies
corresponding to the continent’s control bonus value. In any case, the minimal
number of reinforcement armies per turn for any player is 3. These armies are
placed in the player’s reinforcement pool. This must be implemented in a
function/method named reinforcement Phase() in the game engine.

2. Issuing Orders
Phase-Players issue orders and place them in their order list through a call to
the Player::issueOrder() method. This method is called in round-robin fashion
across all players by the game engine. This must be implemented in a
function/method named issueOrdersPhase() in the game engine.

3. Orders Execution
Phase-Once all the players have signified in the same turn that they are not
issuing one more order, the game engine proceeds to execute the top order on
the list of orders of each player in a round-robin fashion (i.e. the
“Order Execution Phase”—see below). Once all the players’ orders have
been executed, the main game loop goes back to the reinforcement phase. This
must be implemented in a function/method named executeOrdersPhase() in the game
engine.

This loop shall continue until only one of the
players owns all the territories in the map, at which point a winner is
announced and the game ends. The main game loop also checks for any player that
does not control at least one territory; if so, the player is removed from the
game.

Orders Issuing phase

The issuing orders phase
decision-making is implemented in the player’s issueOrder() method, which
implements the following:

The player decides which neighboring
territories are to be attacked in priority (as a list return by the toAttack()
method), and which of their own territories are to be defended in priority (as
a list returned by the toDefend() method).

The player issues deploy orders on its own
territories that are in the list returned by toDefend(). As long as the player
has armies still to deploy (see startup phase and reinforcement phase), it will
issue a deploy order and no other order. Once it has deployed all its available
armies, it can proceed with other kinds of orders.

The player issues
advance orders to either (1) move armies from one of its own territory to the
other in order to defend them (using toDefend() to make the decision), and/or
(2) move armies from one of its territories to a neighboring enemy territory to
attack them (using toAttack() to make the decision). the toDefend() method).

• The player issues deploy orders on its own
territories that are in the list returned by toDefend(). As long as the player
has armies still to deploy (see startup phase and reinforcement phase), it will
issue a deploy order and no other order. Once it has deployed all its available
armies, it can proceed with other kinds of orders.

• The player issues advance orders to either
(1) move armies from one of its own territory to the other in order to defend
them (using toDefend() to make the decision), and/or (2) move armies from one
of its territories to a neighboring enemy territory to attack them (using
toAttack() to make the decision).

• The player uses one of
the cards in their hand to issue an order that corresponds to the card in
question.

Note that the orders should not be validated
as they are issued. Orders are to be validated only when they are executed in
the orders execution phase. This must be implemented in a function/method named
issueOrdersPhase() in the game engine. The decision-making code must be
implemented within the issueOrder() method of the player class in the
Player.cpp/Player.h files.

Orders execution phase

When the game engine asks the player to give
them their next order, the player returns the next order in their order list.
Once the game engine receives the order, it calls execute() on the order, which
should first validate the order, then enact the order (see Part 4: orders
execution implementation) and record a narrative of its effect stored in the
order object. The game engine should execute all the deploy orders before it
executes any other kind of order. This goes on in round-robin fashion across
the players until all the players’ orders have been executed.

You must deliver a
driver that demonstrates that (1) a player receives the correct number of
armies in the reinforcement phase (showing different cases); (2) a player will
only issue deploy orders and no other kind of orders if they still have armies
in their reinforcement pool; (3) a player can issue advance orders to either
defend or attack, based on the toAttack() and toDefend() lists; (4) a player
can play cards to issue orders; (5) a player that does not control any
territory is removed from the game; (6) the game ends when a single player
controls all the territories. All of this except the issueOrder() method must
be implemented in a single.cpp/.h file duo named GameEngine.cpp/Game Engine.h.

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
error: Content is protected !!