// Dig a maze void do_maze(room rp) { SPOT sp; int starty, startx; coord pos = new coord(); for (int i = 0; i < NUMLINES / 3; i++) { for (int j = 0; j < NUMCOLS / 3; j++) { maze[i, j] = new SPOT(); } } Maxy = rp.r_max.y; Maxx = rp.r_max.x; Starty = rp.r_pos.y; Startx = rp.r_pos.x; starty = (rnd(rp.r_max.y) / 2) * 2; startx = (rnd(rp.r_max.x) / 2) * 2; pos.y = starty + Starty; pos.x = startx + Startx; putpass(pos); dig(starty, startx); }
// Dig a maze static void do_maze(room rp) { S.Log("do_maze()"); //SPOT sp; int starty, startx; Coord pos = new Coord(); for (int i = 0; i < R14.NUMLINES / 3; i++) { for (int j = 0; j < R14.NUMCOLS / 3; j++) { maze[i, j] = new SPOT(); } } Maxy = rp.Size.y; Maxx = rp.Size.x; Starty = rp.PosUL.y; Startx = rp.PosUL.x; starty = (R14.rnd(rp.Size.y) / 2) * 2; startx = (R14.rnd(rp.Size.x) / 2) * 2; pos.y = starty + Starty; pos.x = startx + Startx; putpass(pos); dig(starty, startx); }
public void TouchTheSpot() { if (mySpot_ == SPOT.QUEEN) { mySpot_ = SPOT.SAFE; } else if (mySpot_ == SPOT.SAFE) { mySpot_ = SPOT.QUEEN; } }
public string AddNewSpotItem(TradeSharpConnection context, SpotModel model) { var result = string.Empty; var newContext = EnsureContext(ref context); try { var spot = new SPOT { ComBase = model.ComBase, ComCounter = model.ComCounter, Title = model.Title, CodeFXI = model.CodeFXI, MinVolume = model.MinVolume, MinStepVolume = model.MinStepVolume, Precise = model.Precise, SwapBuy = model.SwapBuy, SwapSell = model.SwapSell, Description = model.Description }; context.SPOT.Add(spot); context.SaveChanges(); } catch (Exception ex) { Logger.Error("AddNewSpotItem()", ex); result = ex.Message; } finally { if (newContext != null) { newContext.Dispose(); } } return(result); }
// Dig a maze void do_maze(room rp) { SPOT sp; int starty, startx; coord pos = new coord(); for (int i = 0; i < NUMLINES / 3; i++) for (int j = 0; j < NUMCOLS / 3; j++) { maze[i, j] = new SPOT(); } Maxy = rp.r_max.y; Maxx = rp.r_max.x; Starty = rp.r_pos.y; Startx = rp.r_pos.x; starty = (rnd(rp.r_max.y) / 2) * 2; startx = (rnd(rp.r_max.x) / 2) * 2; pos.y = starty + Starty; pos.x = startx + Startx; putpass(pos); dig(starty, startx); }
public void SetSpot(SPOT spot_) { mySpot_ = spot_; }