A study of cognitive and affective outcomes of a chemistry learning game