mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-05 09:41:37 +00:00
* Move "using namespace std;" from header to module file (to no longer pollute the global namespace). * Fix inconsistency of having namespace prefix in test code. * Add include guard to GildedRose.h. * Avoid std::endl. * Have consistent white-space.
24 lines
373 B
C++
24 lines
373 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
class Item
|
|
{
|
|
public:
|
|
std::string name;
|
|
int sellIn;
|
|
int quality;
|
|
Item(std::string name, int sellIn, int quality) : name(name), sellIn(sellIn), quality(quality)
|
|
{}
|
|
};
|
|
|
|
class GildedRose
|
|
{
|
|
public:
|
|
std::vector<Item> & items;
|
|
GildedRose(std::vector<Item> & items);
|
|
|
|
void updateQuality();
|
|
};
|