void TextBox1KeyDown(object sender, KeyEventArgs e) { switch (e.KeyData) { case Keys.Up: gm.MoveDot(1); break; case Keys.Down: gm.MoveDot(2); break; case Keys.Left: gm.MoveDot(3); break; case Keys.Right: gm.MoveDot(4); break; } if (gm.lvl > 5) { gameBox.Image = winImg.Images[0]; } else { gameBox.Image = Zagogulina.Image(); } }
public AboutBox() { InitializeComponent(); gm = new Game(skoba); gameBox.Image = Zagogulina.Image(); }
void Reset(int objCou) { Zagogulina.idx = 0; Zagogulina.LockId = -1; Zagogulina.Milieu = new Zagogulina[objCou]; Zagogulina.Participant = new Point[objCou]; Dot = new Zagogulina(); Dot.type = "o"; }
void Level1() { Reset(3); Target = new Point(3, 0); FinPos = new Point(2, 0); Dot.pos = new Point(0, 0); Zagogulina.Battlefield = new Rectangle(0, 0, 3, 2); Zagogulina.tgt = GetTargetDrawRec(); Zagogulina nov; nov = new Zagogulina(new Point(1, 1), "bc", true); nov.sizeType = 1; nov = new Zagogulina(new Point(2, 0), "bc", true); }
void Level5() { Reset(5); Target = new Point(5, 1); FinPos = new Point(4, 1); Dot.pos = new Point(3, 1); Zagogulina.Battlefield = new Rectangle(0, 0, 5, 2); Zagogulina.tgt = GetTargetDrawRec(); Zagogulina nov; nov = new Zagogulina(new Point(4, 1), "u", true); nov.sizeType = 1; nov = new Zagogulina(new Point(3, 0), "n", false); nov = new Zagogulina(new Point(2, 1), "bc", false); nov = new Zagogulina(new Point(1, 1), "u", true); }
void Level3() { Reset(5); Target = new Point(3, 1); FinPos = new Point(2, 1); Dot.pos = new Point(1, 1); Zagogulina.Battlefield = new Rectangle(0, 0, 3, 3); Zagogulina.tgt = GetTargetDrawRec(); Zagogulina nov; nov = new Zagogulina(new Point(0, 1), "c", true); nov.sizeType = 1; nov = new Zagogulina(new Point(2, 1), "n", true); nov = new Zagogulina(new Point(1, 0), "n", false); nov = new Zagogulina(new Point(1, 2), "u", false); // nov.sizeType =1; // small red // nov.isRed = true; // big red }
void ReloadClick(object sender, EventArgs e) { gm.ReLoadLvl(); gameBox.Image = Zagogulina.Image(); }