working on computer's play logic