def testScores1(self): """ """ env = SevenKingEnv() infos, public_state, person_states, private_state = env.init() self.assertTrue("" not in infos[public_state.turn].person_state.available_actions) self.assertFalse(env.is_action_valid(SevenKingAction.lookup(""),public_state, person_states[public_state.turn]))
def testEnv(self): """ """ env = SevenKingEnv() infos, public_state, person_states, private_state = env.init({"num_players":2}) assert(len(infos) == 2) turn = public_state.turn self.show_hand_card(person_states[turn].hand_cards) print (turn) print ("available_actions=",person_states[turn].available_actions.keys()) print ("available_actions_v=",person_states[turn].available_actions.values()) action = SevenKingAction("%s" % (person_states[turn].hand_cards[0].key)) infos, public_state, person_states, private_state = env.forward(action)
def testCase1(self): import roomai.sevenking env = SevenKingEnv() all_cards = roomai.sevenking.AllSevenKingPokerCards.values() infos, public_state, person_states, private_state = env.init( {"allcards": all_cards})