I’m writing a game where the player has to push all of the blocks into the holes in as few moves as possible, but I’m having trouble getting the player colliding with the blocks correctly.
I know I must be doing something VERY inefficiently. The only way I could think to do it was to call a new block like this -
this.block1 = new Block();
this.block2 = new Block();
and to keep doing that until I had as many as I needed. But something about that seems wrong.
Any help?
Thanks,
-Nathan