private Cell[] GetCellsBlockPath() => new Cell[3] { new Cell(1, 0, RandomBall.GetRand()), new Cell(1, 1, RandomBall.GetRand()), new Cell(0, 1, RandomBall.GetRand()) };
public void PathExist() { Cell startCellWithBall = new Cell(0, 0, RandomBall.GetRand()); Cell tergetEmptyCell = new Cell(_defBoardSize - 1, _defBoardSize - 1); _board.AddBallToCell(startCellWithBall); Assert.IsTrue(_board.IsPathExist(startCellWithBall, tergetEmptyCell)); }
public override void Show() { base.Show(); giftBox.PlayAnimation("box", true); timeEslapsed = 0f; message.Visible = false; randomBall = new RandomBall(GameSettingHelper.GetRandomBall().LargeSpritePath); glowing.Visible = false; ExtendedGame.AssetManager.PlaySoundEffect("Sounds/snd_gift"); }
public void PathNotExist() { Cell startCellWithBall = new Cell(0, 0, RandomBall.GetRand()); Cell tergetEmptyCell = new Cell(_defBoardSize - 1, _defBoardSize - 1); Cell[] cellsBlockingPath = GetCellsBlockPath(); _board.AddBallToCell(startCellWithBall); _board.AddBallToCell(cellsBlockingPath); Assert.IsFalse(_board.IsPathExist(startCellWithBall, tergetEmptyCell)); }
private void AddBallsToBoardCells(int countBalls) { int counter = 0; for (int row = 0; row < _defBoardSize; row++) { for (int col = 0; col < _defBoardSize; col++) { _board[row][col].Ball = RandomBall.GetRand(); if (++counter == countBalls) { return; } } } }
// Use this for initialization void Start() { MakeMeshData(); //CreateMesh (vertices1, triangles1); rb = new RandomBall(); }
void Start() { tr = GetComponent <TrailRenderer>(); tr.time = 1000000; rb = new RandomBall(); }