diff --git a/README.md b/README.md index 65562e216e241c186b2772df00c72d19a4100162..e4d4f8d36f0a9d5c632e6fb82a0ba39942de2f4c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,15 @@ #### 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. + --- diff --git a/gtk_qpong_app/QWindow.cpp b/gtk_qpong_app/QWindow.cpp index 16d7a9708cf0d361a91ae15c24efd0a98b3bb9ee..f759a3141af145093dceab0aff07ff15fd11f2e3 100644 --- a/gtk_qpong_app/QWindow.cpp +++ b/gtk_qpong_app/QWindow.cpp @@ -175,6 +175,8 @@ bool QWindow::onKeyPress(GdkEventKey* event) constexpr int a = 97; constexpr int ue = 252; constexpr int oe = 246; + constexpr int p = 112; + constexpr int l = 108; if (event->type == GdkEventType::GDK_KEY_PRESS) { @@ -182,9 +184,9 @@ bool QWindow::onKeyPress(GdkEventKey* event) qPressed = true; if (event->keyval == a) aPressed = true; - if (event->keyval == ue) + if (event->keyval == p) upPressed = true; - if (event->keyval == oe) + if (event->keyval == l) downPressed = true; } else if (event->type == GdkEventType::GDK_KEY_RELEASE) @@ -193,9 +195,9 @@ bool QWindow::onKeyPress(GdkEventKey* event) qPressed = false; if (event->keyval == a) aPressed = false; - if (event->keyval == ue) + if (event->keyval == p) upPressed = false; - if (event->keyval == oe) + if (event->keyval == l) downPressed = false; } return true; diff --git a/gtk_qpong_app/main.cpp b/gtk_qpong_app/main.cpp index 14de39ca7db4112fdb178b1c5f08958fbefb1bb1..f74f4668af221e56d7e8ee4657d6e0b938ee7a02 100644 --- a/gtk_qpong_app/main.cpp +++ b/gtk_qpong_app/main.cpp @@ -25,8 +25,8 @@ int main(int argc, char* argv[]) spdlog::info(" up: Q"); spdlog::info(" down: A"); spdlog::info("Controls player 2:"); - spdlog::info(" up: Ü"); - spdlog::info(" down: Ö"); + spdlog::info(" up: P"); + spdlog::info(" down: L"); std::cout << std::endl; 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.");