Is the word "toy" used in the same way in the following two sentences?

Toy with an idea.

Figo is toying with the English defence.
the same meaning