Avoid EXPLODINGTNT with your cursor.
Join csfirst to get a better idea of how to code games similar to this.