Swift implementation of simple interactive art