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); }
public FormMain() { InitializeComponent(); world = new CWorld(); }