text: /*******************************************************************************************
  *
  *   raylib [core] example - Keyboard input
  *
  *   This example has been created using raylib 1.0 (www.raylib.com)
  *   raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
  *
  *   Copyright (c) 2014 Ramon Santamaria (@raysan5)
  *
  ********************************************************************************************/
  
  #include "raylib.h"
  #include "GameController.h"
  #include <string>
  
  
  int main(void)
  {
      // Initialization
      //--------------------------------------------------------------------------------------
      const int screenWidth = 800;
      const int screenHeight = 450;
  
      InitWindow(screenWidth, screenHeight, "raylib [core] example - keyboard input");
  
      //Vector2 ballPosition = { (float)screenWidth / 2, (float)screenHeight / 2 };
  
      SetTargetFPS(60);               // Set our game to run at 60 frames-per-second
      //--------------------------------------------------------------------------------------
  
      GameController controller(screenWidth, screenHeight);
  
      // Main game loop
      while (!WindowShouldClose())    // Detect window close button or ESC key
      {
          // Update
          //----------------------------------------------------------------------------------
          //if (IsKeyDown(KEY_RIGHT)) ballPosition.x += 2.0f;
          //if (IsKeyDown(KEY_LEFT)) ballPosition.x -= 2.0f;
          //if (IsKeyDown(KEY_UP)) ballPosition.y -= 2.0f;
          //if (IsKeyDown(KEY_DOWN)) ballPosition.y += 2.0f;
          controller.Update();
          //----------------------------------------------------------------------------------
  
          // Draw
          //----------------------------------------------------------------------------------
          BeginDrawing();
  
          ClearBackground(RAYWHITE);
  
          std::string score_text("Score: ");
          score_text += std::to_string(controller.score);
  
          DrawText("Play Pong!", 10, 10, 20, DARKGRAY);
          DrawText(score_text.c_str(), 10, 40, 20, DARKGRAY);
  
          Ball ball = controller.balls[0]; // TODO: generalize
          Vector2 ball_pos = { ball.pos_x, ball.pos_y };
          DrawCircleV(ball_pos, ball.size, MAROON); // TODO: move size to Ball class
  
  
          for (auto paddle: controller.paddles) {
              DrawRectangle( 
                  // TODO: define rect more robustly in paddle class
                  paddle.pos_x - paddle.size_x / 2, 
                  paddle.pos_y - paddle.size_y / 2, 
                  paddle.size_x/2, 
                  paddle.size_y/2, 
                  RED
              );
          }
  
          EndDrawing();
          //----------------------------------------------------------------------------------
      }
  
      // De-Initialization
      //--------------------------------------------------------------------------------------
      CloseWindow();        // Close window and OpenGL context
      //--------------------------------------------------------------------------------------
  
      return 0;
  }