The copyright for the original material will have expired in the case of old fairytales - what you need to be looking out for is copyright on the translation. This is far more likely to still be valid.
So: if you’re using a book, you should be find the date of first publication inside the front cover.
If you’re using the internet you’ll need to track down the reference - unfortunately in this case the internet is not old, and unless something is a direct transcription of an earlier book translation (so the copyright resides in the earlier work), then you’re probably infringing copyright.
Commonly copyright is removed where a work is altered (the degree is defined in each countries law and is pretty easily looked up - but may be confusing, as its often a set of guidelines and precedents, not a hard and fast rule.) Creating a CS game is likely to reasonably constitute that, (with all the choices, additions and changes of person), so long as the fairytale isn’t transcribed verbatim.
The copyright law of the country of publication will apply and with translations that will often be US or UK, simplistically 70 years after the authors death in both cases, (this is easily looked up and if you check you won’t be caught by exceptions).