-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTank.h
More file actions
40 lines (33 loc) · 744 Bytes
/
Tank.h
File metadata and controls
40 lines (33 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// Tank.h
// TankGame
//
// Created by Jacob Gonzalez on 11/04/2015.
// Copyright (c) 2015 Jacob Gonzalez. All rights reserved.
//
#ifndef TANK_H
#define TANK_H
#include "Sprite.h"
#include "Terrain.h"
// :: tank class to control all logic and subviews of a tank ::
class Tank : public Sprite
{
public:
// contructor to set name, texture and color
Tank(std::string name, std::string texture, ConsoleTools::Color color)
: Sprite(texture), _name(name)
{
_fcolor = color;
_init();
}
~Tank()
{}
void update(int t);
void draw();
// : getter for name of player for tank :
std::string get_name() const;
private:
void _init();
std::string _name;
};
#endif // TANK_H