-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddLadderAction.h
More file actions
32 lines (22 loc) · 921 Bytes
/
Copy pathAddLadderAction.h
File metadata and controls
32 lines (22 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once
#include "Input.h"
#include "Output.h"
#include "Action.h"
#include "Ladder.h"
#include <fstream>
class AddLadderAction : public Action
{
// Always add action parameters as private data members
// [Action Parameters]
CellPosition startPos; // 1- The start position of the ladder
CellPosition endPos; // 2- The end position of the ladder
// Note: These parameters should be read in ReadActionParameters()
public:
AddLadderAction(ApplicationManager *pApp); // A Constructor
virtual void ReadActionParameters(); // Reads AddLadderAction action parameters (startPos, endPos)
virtual void Open(ifstream& Infile);
virtual void Execute(); // Creates a new Ladder Object
// then Sets this Ladder object to the GameObject Pointer of its Cell
virtual void Execute(const CellPosition& fromCell, const CellPosition& toCell);
virtual ~AddLadderAction(); // Virtual Destructor
};