From 85ee6e4f1794b03279343ddc5fa99c53384c99dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Leclaire-Fournier?= Date: Wed, 17 Jan 2024 19:19:29 -0500 Subject: [PATCH] Ajout de GOLTeamH --- GPA675Lab1GOL/GOLTeamH.cpp | 97 ++++++++++++++++++++++++++++++++++++++ GPA675Lab1GOL/GOLTeamH.h | 33 ++++++++++++- 2 files changed, 128 insertions(+), 2 deletions(-) diff --git a/GPA675Lab1GOL/GOLTeamH.cpp b/GPA675Lab1GOL/GOLTeamH.cpp index 50f7e13..888a4ee 100644 --- a/GPA675Lab1GOL/GOLTeamH.cpp +++ b/GPA675Lab1GOL/GOLTeamH.cpp @@ -1 +1,98 @@ #include "GOLTeamH.h" + +size_t GOLTeamH::width() const +{ + return size_t(); +} + +size_t GOLTeamH::height() const +{ + return size_t(); +} + +size_t GOLTeamH::size() const +{ + return size_t(); +} + +GOL::State GOLTeamH::state(int x, int y) const +{ + return State(); +} + +std::string GOLTeamH::rule() const +{ + return std::string(); +} + +GOL::BorderManagement GOLTeamH::borderManagement() const +{ + return BorderManagement(); +} + +GOL::Color GOLTeamH::color(State state) const +{ + return Color(); +} + +GOL::Statistics GOLTeamH::statistics() const +{ + return Statistics(); +} + +GOL::ImplementationInformation GOLTeamH::information() const +{ + return ImplementationInformation(); +} + +void GOLTeamH::resize(size_t width, size_t height, State defaultState) +{ + mData.resize(width, height, defaultState); +} + +bool GOLTeamH::setRule(std::string const& rule) +{ + return false; +} + +void GOLTeamH::setBorderManagement(BorderManagement borderManagement) +{ +} + +void GOLTeamH::setState(int x, int y, State state) +{ +} + +void GOLTeamH::fill(State state) +{ +} + +void GOLTeamH::fillAlternately(State firstCell) +{ +} + +void GOLTeamH::randomize(double percentAlive) +{ +} + +bool GOLTeamH::setFromPattern(std::string const& pattern, int centerX, int centerY) +{ + return false; +} + +bool GOLTeamH::setFromPattern(std::string const& pattern) +{ + return false; +} + +void GOLTeamH::setSolidColor(State state, Color const& color) +{ +} + +void GOLTeamH::processOneStep() +{ +} + +void GOLTeamH::updateImage(uint32_t* buffer, size_t buffer_size) const +{ +} diff --git a/GPA675Lab1GOL/GOLTeamH.h b/GPA675Lab1GOL/GOLTeamH.h index 2358513..cd4a39e 100644 --- a/GPA675Lab1GOL/GOLTeamH.h +++ b/GPA675Lab1GOL/GOLTeamH.h @@ -1,6 +1,35 @@ #pragma once -class GOLTeamH -{ +#include +#include +#include "Grid.h" + +class GOLTeamH : public GOL +{ +public: + size_t width() const override; + size_t height() const override; + size_t size() const override; + State state(int x, int y) const override; + std::string rule() const override; + BorderManagement borderManagement() const override; + Color color(State state) const override; + Statistics statistics() const override; + ImplementationInformation information() const override; + void resize(size_t width, size_t height, State defaultState) override; + bool setRule(std::string const& rule) override; + void setBorderManagement(BorderManagement borderManagement) override; + void setState(int x, int y, State state) override; + void fill(State state) override; + void fillAlternately(State firstCell) override; + void randomize(double percentAlive) override; + bool setFromPattern(std::string const& pattern, int centerX, int centerY) override; + bool setFromPattern(std::string const& pattern) override; + void setSolidColor(State state, Color const& color) override; + void processOneStep() override; + void updateImage(uint32_t* buffer, size_t buffer_size) const override; +private: + Grid mData; + std::string mRule; };