Skip to content
Snippets Groups Projects
Commit 456a8a9c authored by Armin Co's avatar Armin Co
Browse files

Updated description and controls.

parent 90cf49db
Branches
No related tags found
No related merge requests found
...@@ -2,7 +2,15 @@ ...@@ -2,7 +2,15 @@
#### This is the new pong ;) #### This is the new pong ;)
Controls for Player one: a & q and for Player two ö & ü. A new kind of pong. It will feel familiar but different.
If you want two know more about what is happening behind the scenes visit [https://gitlab.cvh-server.de/pgerwinski/diss](https://gitlab.cvh-server.de/pgerwinski/diss).
If youu play the game you will have to control bats as in the original pong game. But instead of a ball there is a quantum particle that you will have to hit.
The image on the left handside is where you play in it shows the particles "position". The image on the right handside shows the impulse of the particle.
Have fun!
Controls for Player 1: A & Q and for Player two P & L.
--- ---
......
...@@ -175,6 +175,8 @@ bool QWindow::onKeyPress(GdkEventKey* event) ...@@ -175,6 +175,8 @@ bool QWindow::onKeyPress(GdkEventKey* event)
constexpr int a = 97; constexpr int a = 97;
constexpr int ue = 252; constexpr int ue = 252;
constexpr int oe = 246; constexpr int oe = 246;
constexpr int p = 112;
constexpr int l = 108;
if (event->type == GdkEventType::GDK_KEY_PRESS) if (event->type == GdkEventType::GDK_KEY_PRESS)
{ {
...@@ -182,9 +184,9 @@ bool QWindow::onKeyPress(GdkEventKey* event) ...@@ -182,9 +184,9 @@ bool QWindow::onKeyPress(GdkEventKey* event)
qPressed = true; qPressed = true;
if (event->keyval == a) if (event->keyval == a)
aPressed = true; aPressed = true;
if (event->keyval == ue) if (event->keyval == p)
upPressed = true; upPressed = true;
if (event->keyval == oe) if (event->keyval == l)
downPressed = true; downPressed = true;
} }
else if (event->type == GdkEventType::GDK_KEY_RELEASE) else if (event->type == GdkEventType::GDK_KEY_RELEASE)
...@@ -193,9 +195,9 @@ bool QWindow::onKeyPress(GdkEventKey* event) ...@@ -193,9 +195,9 @@ bool QWindow::onKeyPress(GdkEventKey* event)
qPressed = false; qPressed = false;
if (event->keyval == a) if (event->keyval == a)
aPressed = false; aPressed = false;
if (event->keyval == ue) if (event->keyval == p)
upPressed = false; upPressed = false;
if (event->keyval == oe) if (event->keyval == l)
downPressed = false; downPressed = false;
} }
return true; return true;
......
...@@ -25,8 +25,8 @@ int main(int argc, char* argv[]) ...@@ -25,8 +25,8 @@ int main(int argc, char* argv[])
spdlog::info(" up: Q"); spdlog::info(" up: Q");
spdlog::info(" down: A"); spdlog::info(" down: A");
spdlog::info("Controls player 2:"); spdlog::info("Controls player 2:");
spdlog::info(" up: Ü"); spdlog::info(" up: P");
spdlog::info(" down: Ö"); spdlog::info(" down: L");
std::cout << std::endl; std::cout << std::endl;
spdlog::info("starting in two seconds - get ready!"); spdlog::info("starting in two seconds - get ready!");
spdlog::info("two restart the game: press 'enter', the 'space bar' or click the button 'Initialise Paritcle' with the mouse pointer."); spdlog::info("two restart the game: press 'enter', the 'space bar' or click the button 'Initialise Paritcle' with the mouse pointer.");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment