Ajout de la classe Block
This commit is contained in:
		
							parent
							
								
									e3eff0eb5f
								
							
						
					
					
						commit
						c53bbbe273
					
				|  | @ -0,0 +1,3 @@ | ||||||
|  | #include "block.cpp" | ||||||
|  | 
 | ||||||
|  | // TODO: implémenter les fonctions de Block
 | ||||||
|  | @ -0,0 +1,27 @@ | ||||||
|  | #ifndef PTF_BALL_HPP | ||||||
|  | #define PTF_BALL_HPP | ||||||
|  | 
 | ||||||
|  | #include <SFML/Graphics.hpp> | ||||||
|  | #include <iostream> | ||||||
|  | 
 | ||||||
|  | class Block { | ||||||
|  | protected: | ||||||
|  |     sf::Vector2i position; | ||||||
|  |     int charge; | ||||||
|  | 
 | ||||||
|  | public: | ||||||
|  |     Block(); | ||||||
|  | 
 | ||||||
|  |     void draw(sf::RenderWindow& window); | ||||||
|  | 
 | ||||||
|  |     // getters et setters
 | ||||||
|  |     sf::Vector2i getPosition() { | ||||||
|  |         return position; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     int getCharge() { | ||||||
|  |         return charge; | ||||||
|  |     } | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | #endif | ||||||
		Loading…
	
		Reference in New Issue