rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.canvas_item

Project: Gui Gin Rummy File name: canvas_item.py Author: William Hale Date created: 3/14/2020

class rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.canvas_item.CanvasItem(item_id: int, game_canvas: GameCanvas)

Bases: object

get_tags()
class rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.canvas_item.CardItem(item_id: int, card_id: int, card_image: CardImage, game_canvas: GameCanvas)

Bases: rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.canvas_item.CanvasItem

flip_over()
is_face_up()bool
set_card_id_face_up(face_up: bool)

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.configurations

Project: Gui Gin Rummy File name: configurations.py Author: William Hale Date created: 3/14/2020

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.env_thread

Project: Gui Gin Rummy File name: env_thread.py Author: William Hale Date created: 3/14/2020

class rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.env_thread.EnvThread(gin_rummy_env: rlcard.envs.gin_rummy.GinRummyEnv, game_canvas: GameCanvas)

Bases: threading.Thread

get_waiting_player_id()int
is_action_id_available()bool
property moves: List[rlcard.games.gin_rummy.utils.move.GinRummyMove]
run()None

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

stop()

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.game_app

Project: Gui Gin Rummy File name: game_app.py Author: William Hale Date created: 3/14/2020

class rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.game_app.GameApp(make_gin_rummy_env: Callable[], GinRummyEnv] = None)

Bases: object

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.game_canvas

Project: Gui Gin Rummy File name: game_canvas.py Author: William Hale Date created: 3/14/2020

class rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.game_canvas.GameCanvas(parent: tkinter.Frame, window_width, window_height, scale_factor, game_app: GameApp)

Bases: tkinter.Canvas

property current_player_id: int
is_treating_as_human(player_id)bool
on_dead_hand()
on_going_out()
property player_types: List[rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.player_type.PlayerType]
update_configuration_game_background_color(background_color)
update_configurations()

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.game_canvas_debug

Project: Gui Gin Rummy File name: game_canvas_debug.py Author: William Hale Date created: 3/14/2020

class rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.game_canvas_debug.GameCanvasDebug(game_canvas: GameCanvas)

Bases: object

description()
get_card_name(card_item_id: int)str

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.game_canvas_getter

Project: Gui Gin Rummy File name: game_canvas_getter.py Author: William Hale Date created: 3/14/2020

class rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.game_canvas_getter.GameCanvasGetter(game_canvas: GameCanvas)

Bases: object

get_card_id(card_item_id: int)int
get_current_player_id()int
get_game()rlcard.games.gin_rummy.game.GinRummyGame
get_game_canvas_moves()List[rlcard.games.gin_rummy.utils.move.GinRummyMove]
get_held_pile_cards(player_id: int)List[rlcard.games.base.Card]
get_held_pile_item_ids(player_id: int)List[int]
get_selected_held_pile_item_ids(player_id: int)List[int]
get_settings()rlcard.games.gin_rummy.utils.settings.Settings
get_stock_pile_item_ids()List[int]
get_tags(item_id)List[str]
get_top_discard_pile_item_id()int
get_top_stock_pile_item_id()int

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.game_canvas_post_doing_action

Project: Gui Gin Rummy File name: game_canvas_post_doing_action.py Author: William Hale Date created: 3/14/2020

class rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.game_canvas_post_doing_action.GameCanvasPostDoingAction(game_canvas: GameCanvas)

Bases: object

post_do_declare_dead_hand_action(player_id: int)
post_do_discard_action(player_id: int, selected_held_pile_item_id: int)
post_do_discard_card_drawn_from_stock_pile_action(top_stock_pile_item_id: int)
post_do_get_card_action(player_id: int, drawn_card_item_id: int, hit_item_id: int, drawn_card_item_tag: int)
post_do_gin_action()
post_do_knock_action(selected_held_pile_item_id: int)
put_down_meld_cluster(meld_cluster, player_id: int)
put_down_meld_pile(meld_pile: List[rlcard.games.base.Card], anchor: Tuple[int, int], player_id: int)

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.game_canvas_query

Project: Gui Gin Rummy File name: game_canvas.query.py Author: William Hale Date created: 3/14/2020

class rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.game_canvas_query.GameCanvasQuery(game_canvas: GameCanvas)

Bases: object

can_declare_dead_hand(player_id: int)bool
can_discard_card(player_id: int)bool
can_draw_from_discard_pile(player_id: int)bool
can_draw_from_stock_pile(player_id: int)bool
can_gin(player_id: int)bool
can_knock(player_id: int)bool
get_game()rlcard.games.gin_rummy.game.GinRummyGame
is_dead_hand_button_visible()
is_game_over()bool
is_going_out_button_visible()
is_human(player_id: int)bool
is_item_id_selected(item_id)bool
static is_scoring(legal_actions: List[int])bool
is_top_discard_pile_item_drawn()bool
is_top_stock_pile_item_drawn()bool

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.game_canvas_updater

Project: Gui Gin Rummy File name: game_canvas_updater.py Author: William Hale Date created: 3/14/2020

class rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.game_canvas_updater.GameCanvasUpdater(game_canvas: GameCanvas)

Bases: object

apply_canvas_updates()
did_perform_actions(actions: List[int])
property env: GinRummyEnv
property human_agent: rlcard.agents.human_agents.gin_rummy_human_agent.gin_rummy_human_agent.HumanAgent
property mark: int
property moves: List[rlcard.games.gin_rummy.utils.move.GinRummyMove]

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.game_frame

Project: Gui Gin Rummy File name: game_frame.py Author: William Hale Date created: 3/14/2020

class rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.game_frame.GameFrame(root: tkinter.Tk, game_app: GameApp)

Bases: tkinter.Frame

start_new_game()
update_configuration_game_background_color(background_color)
update_configurations()

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.handling_tap

Project: Gui Gin Rummy File name: handling_tap.py Author: William Hale Date created: 3/14/2020

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.handling_tap.on_game_canvas_tap(event)

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.handling_tap_discard_pile

Project: Gui Gin Rummy File name: handling_tap_discard_pile.py Author: William Hale Date created: 3/14/2020

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.handling_tap_discard_pile.handle_tap_discard_pile(hit_item: rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.canvas_item.CanvasItem, game_canvas: GameCanvas)

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.handling_tap_held_pile

Project: Gui Gin Rummy File name: handling_tap_held_pile.py Author: William Hale Date created: 3/14/2020

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.handling_tap_held_pile.handle_tap_held_pile(hit_item: rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.canvas_item.CanvasItem, game_canvas: GameCanvas)

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.handling_tap_player_pane

Project: Gui Gin Rummy File name: handling_tap_player_pane.py Author: William Hale Date created: 3/14/2020

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.handling_tap_player_pane.handle_tap_player_pane(hit_item: rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.canvas_item.CanvasItem, event, game_canvas: GameCanvas)

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.handling_tap_stock_pile

Project: Gui Gin Rummy File name: handling_tap_stock_pile.py Author: William Hale Date created: 3/14/2020

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.handling_tap_stock_pile.handle_tap_stock_pile(hit_item: rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.canvas_item.CanvasItem, game_canvas: GameCanvas)

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.handling_tap_to_arrange_held_pile

Project: Gui Gin Rummy File name: handling_tap_to_arrange_held_pile.py Author: William Hale Date created: 3/14/2020

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.handling_tap_to_arrange_held_pile.handle_tap_to_arrange_held_pile(hit_item: rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.canvas_item.CanvasItem, game_canvas: GameCanvas)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.handling_tap_to_arrange_held_pile.on_tap_to_arrange_held_pile(event)

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.info_messaging

Project: Gui Gin Rummy File name: info_messaging.py Author: William Hale Date created: 3/28/2020

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.info_messaging.blank_info_message_label(game_canvas: GameCanvas)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.info_messaging.show_activate_menus_message(game_canvas: GameCanvas)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.info_messaging.show_arrange_cards_message(player_id: int, game_canvas: GameCanvas)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.info_messaging.show_hide_tips_message(game_canvas: GameCanvas)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.info_messaging.show_pick_up_discard_message(player_id: int, game_canvas: GameCanvas)

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.menu_bar

Project: Gui Gin Rummy File name: menu_bar.py Author: William Hale Date created: 3/14/2020

class rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.menu_bar.MenuBar(root: tkinter.Tk, game_frame: GameFrame)

Bases: tkinter.Menu

static on_about_menu_clicked()
on_new_game_menu_clicked()
on_preference_menu_clicked()

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.player_type

Project: Gui Gin Rummy File name: player_type.py Author: William Hale Date created: 3/14/2020

class rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.player_type.PlayerType(value)

Bases: enum.Enum

An enumeration.

computer_player = 1
demo_player = 3
human_player = 2

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.preferences_window

Project: Gui Gin Rummy File name: preferences_window.py Author: William Hale Date created: 3/14/2020

class rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.preferences_window.PreferencesWindow(view)

Bases: object

create_checkbutton(text: str, variable: tkinter.BooleanVar)
create_choice_line(row: int, choice_name: str)
create_listbox(row, column, columnspan, items)
on_cancel_button_clicked()
on_save_button_clicked()
set_game_background_color()
set_new_values()

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.starting_new_game

Project: Gui Gin Rummy File name: starting_new_game.py Author: William Hale Date created: 3/14/2020

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.starting_new_game.show_new_game(game_canvas: GameCanvas)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.starting_new_game.start_new_game(game_canvas: GameCanvas)

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.status_messaging

Project: Gui Gin Rummy File name: status_messaging.py Author: William Hale Date created: 3/14/2020

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.status_messaging.show_epilog_message_on_declare_dead_hand(game_canvas: GameCanvas)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.status_messaging.show_game_over_message(game: rlcard.games.gin_rummy.game.GinRummyGame, game_canvas: GameCanvas)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.status_messaging.show_prolog_message(player_id: int, legal_actions, game_canvas: GameCanvas)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.status_messaging.show_put_card_message(player_id: int, game_canvas: GameCanvas)

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils

Project: Gui Gin Rummy File name: utils.py Author: William Hale Date created: 3/14/2020

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils.drop_item_ids(item_ids: List[int], on_item_id: int, player_id: int, game_canvas: GameCanvas)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils.fan_held_pile(player_id: int, game_canvas: GameCanvas)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils.flip_card_id(card_id: int, game_canvas: GameCanvas)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils.get_action_card_id(action: int)int
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils.get_action_type(action: int)int
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils.gin_rummy_sort_order_id(card_id: int)int
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils.held_pile_insert(card_item_id: int, above_hit_item_id: int, player_id: int, game_canvas: GameCanvas)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils.is_debug()bool
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils.jog_card_id(card_id: int, dx: float, dy: float, game_canvas: GameCanvas)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils.move_to(item_id: int, x: int, y: int, parent: tkinter.Canvas)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils.player_name(player_id: int)str
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils.player_short_name(player_id: int)str
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils.set_card_id_face_up(card_id: int, face_up: bool, game_canvas: GameCanvas)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils.set_card_item_id_face_up(card_item_id: int, face_up: bool, game_canvas: GameCanvas)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils.toggle_discard_pile_item_selected(game_canvas: GameCanvas)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils.toggle_held_pile_item_selected(item: rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.canvas_item.CanvasItem, game_canvas: GameCanvas)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils.toggle_stock_pile_item_selected(game_canvas: GameCanvas)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils.translated_by(dx: float, dy: float, location)

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils_extra

Project: Gui Gin Rummy File name: utils_extra.py Author: William Hale Date created: 3/14/2020

rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils_extra.mask_rounded_rectangle_transparent(pil_img, corner_radius=8)
rlcard.agents.human_agents.gin_rummy_human_agent.gui_gin_rummy.utils_extra.rounded_rectangle(self: <module 'PIL.ImageDraw' from '/Users/songyih/.pyenv/versions/3.7.2/lib/python3.7/site-packages/PIL/ImageDraw.py'>, xy, corner_radius, fill=None, outline=None)