Added toggleSelected method within triangles class: