KeeganWoods1/C345---Risk

Orders List

Closed this issue · 0 comments

Implement a group of C++ classes that implement a Warzone player orders using the following design:

  1. Orders are created by the player during their turn and placed into the player’s list of orders. By default,
    each order is placed in the list sequentially.

  2. After orders are put in the list, the player can move them around in the list (using the move() method) or
    delete them (using the remove() method).

  3. The different kinds of orders are: deploy, advance, bomb, blockade, airlift, and negotiate.

  4. All orders must have a validate() method that verifies if the order is valid.

  5. All orders must have an execute() method that will result in some game action being implemented (see the
    project description document. Note that the orders’ actions do not need to be implemented at this point).

  6. Invalid orders can be created and put in the list, but their execution will not result in any action.

All the classes/functions that you implement for this component must all reside in a single .cpp/.h file duo
named Orders.cpp/Orders.h. You must deliver a file named OrdersDriver.cpp file that contains a main function
that creates a list of orders and demonstrates that the OrdersList implemented according to the following
specifications:

1)The OrdersList class contains a list of Order objects.

2)Each kind of order is implemented as a subclass of the Order class.

3)The Order class implements a stream insertion operator that outputs a string describing the
   order. If the order has been executed, it should also output the effect of the order.

4)Every order subclass must implement the validate() method that is used to validate if the
   order is valid.

5)Every order subclass must implement the execute() method that first validates the order,
   and executes its action if it is valid, according to the order’s meaning and the player’s state.

6)The OrdersList class implements a remove() method that deletes an order from the list.

7)The OrdersList class implements a move() method to move an order in the list of orders.

8)Driver that creates orders of every kind, places them in an OrdersList object, and
   demonstrates that the above features are available.