Fishtank
tank.cpp
Go to the documentation of this file.
1 #include "tank.h"
2 #include "fish.h"
3 
4 Tank::Tank(std::vector<Fish *> fish) : fish_(fish) {}
5 
6 void Tank::draw(Screen *screen) const {
7  for (size_t i = 0; i < fish_.size(); i++) {
8  fish_[i]->draw(screen);
9  }
10 }
11 
12 void Tank::tick() {
13  for (size_t i = 0; i < fish_.size(); i++) {
14  fish_[i]->tick();
15  }
16 }
Represents the abstract notion of a character-addressable writable screen.
Definition: screen.h:4
void draw(Screen *screen) const
Definition: tank.cpp:6
void tick()
Definition: tank.cpp:12
Tank(std::vector< Fish * > fish)
Definition: tank.cpp:4