aboutsummaryrefslogtreecommitdiff
path: root/cpp01/ex00/Pony.cpp
blob: f521d4b8b76e15ee4df4991266212f10e9c51da8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <iostream>
#include "Pony.hpp"

Pony::Pony(int w, int s)
{
	weight = w;
	max_speed = s;
}

void Pony::say_hello()
{
	std::cout << "Hi, I'm a pony, I weight " << weight
		<< " and my speed limit is " << max_speed << std::endl;
}

void Pony::run()
{
	for (int i = 0; i < max_speed; i++)
		std::cout << "I'm running really fast at " << i << ", look at me!" << std::endl;
}