New square appears on contact, Final Product

A new square appears when in contact with the barrier, also it changes
color to yelow.