with
  Terminal_Interface.Curses,
  C_Signals;

package Bounce is
   Top_Row    : constant := 5;
   Bottom_Row : constant := 20;
   Left_Edge  : constant := 10;
   Right_Edge : constant := 70;

   procedure Set_Up;
   procedure Wrap_Up;

   type Point is
      record
         X : Terminal_Interface.Curses.Column_Position;
         Y : Terminal_Interface.Curses.Line_Position;
      end record;

   type Vector is
      record
         X, Y : Integer;
      end record;

   type Ping_Pong_Ball is
      record
         Position  : Point;
         TTM       : Vector;
         TTG       : Vector;
         Direction : Vector;
         Symbol    : Character;
      end record;

   Ball : Ping_Pong_Ball := (Position  => (X => 10, Y => 10),
                             TTM       => (X =>  5, Y =>  8),
                             TTG       => (X =>  5, Y =>  8),
                             Direction => (X =>  1, Y =>  1),
                             Symbol    => 'o');

private

   procedure Move_Ball (Handling : in C_Signals.Signal_Types);
   pragma Convention (C, Move_Ball);

   procedure Bounce_Or_Lose (Ball : in out Ping_Pong_Ball);
end Bounce;

