/* This file is part of Invaders. * * Copyright (C) 2020 LCM. * You may use, distribute and modify Invaders under the terms of the * GPLv3 license, available at . */ #ifndef _player_ #define _player_ #include "game_object.hpp" #include "rocket.hpp" #include "definitions.hpp" #include class player : public game_object { public: player(); //default constructor: creates a 8-long player in C/2,R player(int); //user-defined length constructor ~player() {} void next_pos(int command); //moves player according to command (WASD or arrow keys) void shoot(std::list &); //adds a new bullet to the list void shootrkt(std::list &); void set_commands(int* _commands); int weaponclass; int weaponclassrkt; int length; bool rocketlauncher; //when rocketlauncher is TRUE, player can shoot rockets. int commands[4]; bool godmode; }; #endif