![]() ![]() Since your doing a match-3 game, add every number at least 3 times. Thrid step, it was picked randomly to add a set of number 5 with a size of 3 from the fourth column | | | | | | |Īs mentioned in this comment, you could add your numbers many times so you increase the chances of matches. Second step, it was picked randomly to add a set of number 9 with a size of 4 from the third column | | | | | | | Set should be matching so put for example sets containing between 3 and 5 tiles.įirst step, it was picked randomly to add a set of number 4 with a size of 3 from the second column | | | | | | | Every time you add a set it will push already filled tiles up. You can fill your board by adding set of tiles at the bottom of the board until it is filled. ![]() In the case you are building a game where the gravity pull tiles down. Your algorithm will look like : public void fillBoard(Board board) Īs mentioned in this comment, a lot of puzzle are first build solved, then mixed. And then complete the empty places by solo random numbers. You need to somehow define an intern rule that will force the matches to occur more often.Īs mentioned in this comment you could for example first fill your board using shapes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |