This commit is contained in:
Trygve 2024-03-13 01:52:28 +01:00
parent 09548ce411
commit f0ab2ba304
1 changed files with 13 additions and 0 deletions

13
lab_3/20.md Normal file
View File

@ -0,0 +1,13 @@
# Do you want any of your classes to act as a container for objects of the other classes?
I will use Configuration as a container for the Board and a vector of Pieces.
# For which of the classes would you write aconstructor (or multiple constructors)?
I will write a constructor for the Configuration class to set up the whole board.
The Piece class will have a constructor to make it easier to create. The queen inherits its constructor from Piece.
The Board class does not need a constructor as i am only creating it once.
# A destructor?
I will write a destructor for the configuration class because it holds a pointer to a Board object.
# A copy constructor and copy assignment operator?
I will write a copy constructor and copy assignment operator for the Configuration class because it holds a pointer to a Board object.