This site requires JavaScript, please enable it in your browser!
Greenfoot back
JosephTheVA
JosephTheVA wrote ...

2018/2/14

Bejeweled Board

JosephTheVA JosephTheVA

2018/2/14

#
If I was to try to generate a board with the code, where would I need to start?
Super_Hippo Super_Hippo

2018/2/14

#
Create an actor subclass for the jewels. In the world, have two for loops iterating through all possible positions and at every position, create a random jewel.
danpost danpost

2018/2/14

#
JosephTheVA wrote...
If I was to try to generate a board with the code, where would I need to start?
As with any scenario, you start in your World subclass constructor. Your world can be either with pixel-sized cells or use a grid of large-sized cells. You would then add code to build the world and add Actor subclasses as needed. Only one subclass of Actor is needed for all gems -- or, rather, the main playing tiles. A field of int or String value, or just its image (which can be given randomly), can be used to identify which type piece the tile is.
You need to login to post a reply.