Put checking for winning conditions after painting to playframe in order to avoid error due to playFrame beeing destroyed and then tried to paint on it