Application that plays “Candy Crush” game without any human interaction.
I have built a bot (automatic tool) with my partner Ferran Coma, using Java language. This one was my first serious Java project . The application was used to play a “Candy Crush Saga” game type from computer without human interaction. This game belongs to the following website: https://www.worldwinner.com/
The target for this application was to beat most of the players playing this game, on that website, where the winner gets the opponent’s money. What we accomplished was to make the application read the screen, keep an instance of the screen, create a matrix with the current figures and then, apply an algorithm designed by us that decided which movement was the best one to apply, depending on the current state of the game. Algorithm steps were the following:
- Try to find a bonus figure (it’s the easiest one and the one that gives the most score when using it)
- Try to make a move that combines 5 figures, to get a bonus figure
- Try to get a shinning figure combining 4 figures
- Try to to combine a shinning figure (it makes an explosion thus gives more score)
- Make any valid movement
All these steps were being checked from the bottom of the board to the top, so it makes the highest mess on the board and it was easier to get combos. Then, we also used java.robot to move the mouse. The mouse was moved smoothly as well as not always precise (it didn’t always fall into the center of the figure we wanted to select), to avoid getting caught. Although we put as many effords as we could, we got caught after a few weeks so we decided to try to sell the software with not too much success.
The source code of the project can be found in the following link (The code looks a bit messy as it was our first Java project and we were starting second year of computer science):
https://github.com/noxerr/Personal/tree/master/Prueba
Youtube video can be seen below: