Exemple #1
0
        public static Bitmap GetGridFromScreeshot(Bitmap screenshot, GameMode gameMode)
        {
            var pos = GridLocator.LocateGrid(gameMode);

            return(Crop(screenshot, new Rectangle(pos.X, pos.Y, GridWidth, GridHeight)));
        }
Exemple #2
0
        public static Bitmap GetBlockFromScreenshot(Bitmap screenshot, GameMode gameMode, int coluna, int linha)
        {
            var pos = GridLocator.LocateGrid(gameMode);

            return(Crop(screenshot, new Rectangle(pos.X + (BlockWidth * coluna), pos.Y + (BlockHeight * linha), BlockWidth, BlockHeight)));
        }