Random Square logic