Improved playing logic