Woah flashback! I remember playing a game just like this on my dads Amiga500. Cool!
The game you mentioned is called "Logical". I've added some new features to GudeBalls.