From 8af1284654a4a5d454a559eca371bf0ac3c79786 Mon Sep 17 00:00:00 2001 From: jacopograndi Date: Tue, 31 Aug 2021 23:53:53 +0200 Subject: tech done, building sprites, upgrade on age up, gui --- game/player.h | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'game/player.h') diff --git a/game/player.h b/game/player.h index 01d8ee9..cf4146f 100644 --- a/game/player.h +++ b/game/player.h @@ -3,14 +3,41 @@ #include +#include "tech.h" + class Player { public: - Player (int r, int g, int b) : r(r), g(g), b(b) { } + Player (int r, int g, int b, int id) : r(r), g(g), b(b), id(id) { } + + void pay (std::vector cost) { + for (int i=0; i gain) { + for (int i=0; i res { 0, 0 }; + bool operator== (Player &oth) { return id == oth.id; } + + int id; + + std::vector res { 0, 0 }; std::vector techs; + TechLookup tech_lookup; + + int researching { -1 }; + int leveling_up { -1 }; int level { 0 }; int r, g, b; -- cgit v1.2.3-54-g00ecf