Color Blocks game in JavaScript