Exemple #1
0
        public FieldRegion Row(int x)
        {
            FieldRegion ret = new FieldRegion();

            for (int y = 0; y < Height; y++)
            {
                ret.Add(x * Width + y, GetField(new Vector2i(x, y)));
            }
            return(ret);
        }
Exemple #2
0
        public FieldRegion Column(int y)
        {
            FieldRegion ret = new FieldRegion();

            for (int x = 0; x < Width; x++)
            {
                ret.Add(x * Width + y, GetField(new Vector2i(x, y)));
            }
            return(ret);
        }
Exemple #3
0
        public FieldRegion RightTopToLeftButtom(int x)
        {
            FieldRegion ret = new FieldRegion();

            for (int y = 0; y < Height; y++)
            {
                if (x < 0 || x >= Width)
                {
                    break;
                }
                ret.Add(x * Width + y, GetField(new Vector2i(x, y)));
                x--;
            }
            return(ret);
        }