public MainBoard(Panel panel, deClear _clear, Label _score) { panelGame = panel; needClear = _clear; score = _score; mobs = new List <Mob>(); int boxSize; if ((panelGame.Width / sizeX) < (panelGame.Height / sizeY)) { boxSize = panelGame.Width / sizeX; } else { boxSize = panelGame.Height / sizeY; } InitStartMap(boxSize); InitStartPlayer(boxSize); for (int i = 0; i < 3; i++) { InitMob(boxSize); } BonusClass.Prepare(); }
public void Move(int sx, int sy) { if (isEmpty(ref sx, ref sy)) { player.Location = new Point(player.Location.X + sx, player.Location.Y + sy); Point myPlace = MyCurrentPossition(); if (map[myPlace.X, myPlace.Y] == Sost.приз) { //получение бонуса addBonus(BonusClass.GetBonus()); map[myPlace.X, myPlace.Y] = Sost.пусто; mapPic[myPlace.X, myPlace.Y].Image = Properties.Resources.ground; } } }