I'm working on ps3a right now, on the wordgame. It is all working fine except I can't figure out how to get the play_hand function to return both the partially used hand (so that the player can go back and play the last hand again if he wants to) and the score from that hand (so it can figure an overall score for the game). Any suggestions? http://dpaste.com/808786/
are you asking about implementing the spec at lines 15-17?
line 38 comment - read this http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html#testing-for-truth-values
Yes, I'm not sure how to impletment the spec in lines 15-17.
play_hand does not return anything to play_game: all point totals are kept in play_hand the spec for play_game only allows a replay of the previous hand not a 'partially used hand' whatever that means read the play_game and play_hand specification again then look at the example outputs of play_hand
ok, i see what the problem is now. A partially used hand refers to your last hand that you quit for some reason, and then you want to go back to it. However, in order for that to work play_hand has to return whatever is left of the hand. I was thinking I needed to compile a score for all the hands played.
Play_hand does NOT return Anything to play_game. the function specifications do not allow play_game to restart a partially completed hand
Repeating the hand in this scenario refers to simply not getting a new combination of letters first.
Join our real-time social learning platform and learn together with your friends!