Пример #1
0
        //géré par un thread
        public void userCommand(ConsoleKeyInfo cki)
        {
            if (cki.Key == ConsoleKey.LeftArrow && !grille.OutOfLimitLeft() && !grille.verifLeftPiece())
            {
                goLeft(grille);
            }

            if (cki.Key == ConsoleKey.RightArrow && !grille.OutOfLimitRight() && !grille.verifRightPiece())
            {
                goRight(grille);
            }

            if (cki.Key == ConsoleKey.DownArrow && !grille.verifBelowPiece())
            {
                goDown(grille);
            }
        }