예제 #1
0
        public int xFromVektorR(int n, CWorld World)
        {
            int xt = XCoord;

            n = n + Direct;
            if (n >= 8)
            {
                n = n - 8;
            }
            if (n == 0 || n == 6 || n == 7)
            {
                xt = xt - 1;
                if (xt == -1)
                {
                    xt = World.WorldWidth - 1;
                }
            }
            else if (n == 2 || n == 3 || n == 4)
            {
                xt = xt + 1;
                if (xt == World.WorldWidth)
                {
                    xt = 0;
                }
            }
            return(xt);
        }
예제 #2
0
 public FormMain()
 {
     InitializeComponent();
     world = new CWorld();
 }