Exemple #1
0
        public bool Intersects(COORD aCoord)
        {
            bool hit = false;

            if ((aCoord.X == fPosition.X) &&
                (aCoord.Y >= fPosition.Y) &&
                (aCoord.Y <= fPosition.Y + fPaddleHeight))
                hit = true;

            return hit;
        }
Exemple #2
0
        public Paddle(SMALL_RECT playArea, short row, PaddleSide aSide, Terminal aTerm)
        {
            fPaddleHeight = 5;
            fPlayArea = playArea;
            fColor = ConsoleTextColor.White;
            fSide = aSide;
            fTerm = aTerm;
            
            short column;
            if (PaddleSide.Left == aSide)
                column = 0;
            else
                column = 79;

            fPosition = new COORD(column, row);
        }
 public static extern bool FillConsoleOutputCharacter(IntPtr ConsoleOutput, char Character, uint Length, 
     COORD WriteCoord, out uint NumberOfCharsWritten);
 public static extern bool SetConsoleScreenBufferSize(IntPtr hConsHandle, COORD dwSize);
 public static extern bool FillConsoleOuputAttribute(IntPtr ConsoleOutput, ushort wAttribute, uint nLength,
     COORD dwWriteCoord, out uint NumberofAttrsWritten);
 public static extern bool ScrollConsoleScreenBuffer(IntPtr hConsoleOutput,
     ref SMALL_RECT lpScrollRectangle, IntPtr lpClipRectangle,
     COORD dwDestinationOrigin, ref CHAR_INFO lpFill);
 public static extern bool SetConsoleCursorPosition(IntPtr hConsOutput, COORD cursorPosition);
Exemple #8
0
 public static extern bool FillConsoleOutputCharacter(IntPtr ConsoleOutput, char Character, uint Length,
                                                      COORD WriteCoord, out uint NumberOfCharsWritten);
Exemple #9
0
 public static extern bool FillConsoleOuputAttribute(IntPtr ConsoleOutput, ushort wAttribute, uint nLength,
                                                     COORD dwWriteCoord, out uint NumberofAttrsWritten);
Exemple #10
0
 public static extern bool SetConsoleScreenBufferSize(IntPtr hConsHandle, COORD dwSize);
Exemple #11
0
 public static extern bool SetConsoleCursorPosition(IntPtr hConsOutput, COORD cursorPosition);
Exemple #12
0
 public static extern bool ScrollConsoleScreenBuffer(IntPtr hConsoleOutput,
                                                     ref SMALL_RECT lpScrollRectangle, IntPtr lpClipRectangle,
                                                     COORD dwDestinationOrigin, ref CHAR_INFO lpFill);