updated code with working switch case for blinking ball

the code is buggy for attraction destrcution and stuff..