hello. i have a question come to mind. how do i get the value of the object i am bouncing to, but which is an instance of the same object as self.
let's say i have created one object of circle that changes color when it bounces with another circle. Depending on what color of the other circle instance it bounces with, it changes to a specific color. for example, when a black circle (circle-self) meets with a white circle (circle-bounceTo) , the black circle turns gray and the white circle would turn black. While a gray circle meets a white circle it would turn white and the white one turns gray; and if gray one meets a black one it would turn black and the black one turns gray, for example.
my question is, how do i tell what is the color of the other circle that i (circle-self) am bouncing with at the moment. how do i tell if the other circle is black or white or if it's gray?
is there any way i can recognize the other object i am interacting with and access its current value of its instance variable while it is the same object as i am