37 lines
1.4 KiB
C++
37 lines
1.4 KiB
C++
|
/* ************************************************************************** */
|
|||
|
/* */
|
|||
|
/* ::: :::::::: */
|
|||
|
/* Brain.cpp :+: :+: :+: */
|
|||
|
/* +:+ +:+ +:+ */
|
|||
|
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
|||
|
/* +#+#+#+#+#+ +#+ */
|
|||
|
/* Created: 2024/12/06 11:47:20 by adjoly #+# #+# */
|
|||
|
/* Updated: 2024/12/06 15:53:11 by adjoly ### ########.fr */
|
|||
|
/* */
|
|||
|
/* ************************************************************************** */
|
|||
|
|
|||
|
#include "Brain.hpp"
|
|||
|
|
|||
|
Brain::Brain(void) {
|
|||
|
log("➕", "Brain", "", "construtor called");
|
|||
|
}
|
|||
|
|
|||
|
Brain::~Brain(void) {
|
|||
|
log("➖", "Brain", "", "destructor called");
|
|||
|
}
|
|||
|
|
|||
|
Brain::Brain(const Brain &cpy) {
|
|||
|
log("➕", "Brain", "", "copy construtor called");
|
|||
|
*this = cpy;
|
|||
|
}
|
|||
|
|
|||
|
Brain &Brain::operator=(const Brain &cpy) {
|
|||
|
log("🟰", "Brain", "", "copy assignment construtor called");
|
|||
|
if (this != &cpy) {
|
|||
|
for (uint i = 0; i < 100; i++) {
|
|||
|
this->_ideas[i] = cpy._ideas[i];
|
|||
|
}
|
|||
|
}
|
|||
|
return (*this);
|
|||
|
}
|