#include "command.h" #include "game.h" Command::~Command(){} Nop::~Nop(){} void Nop::execute( GameState &game ){ } // Window commands WindowClose::~WindowClose(){} void WindowClose::execute( GameState &game ){ game.close(); } WindowFocus::~WindowFocus(){} void WindowFocus::execute( GameState &game ){ game.resume(); } WindowUnFocus::~WindowUnFocus(){} void WindowUnFocus::execute( GameState &game ){ game.pause(); } // Keyboard commands KeyboardDownReleased::~KeyboardDownReleased(){} void KeyboardDownReleased::execute( GameState &game ){ game.releaseDown(); } KeyboardDownPressed::~KeyboardDownPressed(){} void KeyboardDownPressed::execute( GameState &game ){ game.pressDown(); } KeyboardLeftPressed::~KeyboardLeftPressed(){} void KeyboardLeftPressed::execute( GameState &game ){ game.pressLeft(); } KeyboardRightPressed::~KeyboardRightPressed(){} void KeyboardRightPressed::execute( GameState &game ){ game.pressRight(); } KeyboardSpacePressed::~KeyboardSpacePressed(){} void KeyboardSpacePressed::execute( GameState &game ){ game.pressRotate(); }