Climate change in a public goods game: Investment decision in mitigation versus adaptation