public class Game extends java.lang.Object implements ModTransactionHandler
| Modifier and Type | Method and Description |
|---|---|
void |
abort_game()
Called after we have left the table.
|
void |
add_event_hook(GameEventListener listener) |
Module |
get_module() |
int |
get_room_id() |
int |
get_seat_num() |
int |
get_table_id() |
void |
handle_boot(java.lang.String name)
Boot a player
|
void |
handle_bot(int seat_num)
Put a bot into an open seat.
|
void |
handle_chat(ChatType type,
java.lang.String recipient,
java.lang.String chat)
A chat originating from the game client.
|
void |
handle_error(java.lang.Throwable exception)
There was an error communicating with the game client.
|
void |
handle_info(int seat_num)
Information about one or more players.
|
void |
handle_open(int seat_num)
Replace a bot/reserved seat with an open one.
|
void |
handle_sit(int seat_num)
Sit down (stop spectatin; join a seat)
|
void |
handle_stand()
Stand up (leave your seat; become a spectator)
|
void |
handle_state(ModState prev)
This function is called by ggzmod when the game state is changed.
|
boolean |
is_spectator() |
void |
launch() |
void |
remove_event_hook(GameEventListener l) |
void |
set_server_fd(java.net.Socket fd) |
public void add_event_hook(GameEventListener listener)
public void remove_event_hook(GameEventListener l)
public void handle_state(ModState prev) throws java.io.IOException
handle_state in interface ModTransactionHandlerjava.io.IOExceptionpublic void handle_error(java.lang.Throwable exception)
ModTransactionHandlerhandle_error in interface ModTransactionHandlerpublic void handle_sit(int seat_num)
throws java.io.IOException
ModTransactionHandlerhandle_sit in interface ModTransactionHandlerjava.io.IOExceptionpublic void handle_stand()
throws java.io.IOException
ModTransactionHandlerhandle_stand in interface ModTransactionHandlerjava.io.IOExceptionpublic void handle_boot(java.lang.String name)
throws java.io.IOException
ModTransactionHandlerhandle_boot in interface ModTransactionHandlerjava.io.IOExceptionpublic void handle_open(int seat_num)
throws java.io.IOException
ModTransactionHandlerhandle_open in interface ModTransactionHandlerjava.io.IOExceptionpublic void handle_bot(int seat_num)
throws java.io.IOException
ModTransactionHandlerhandle_bot in interface ModTransactionHandlerjava.io.IOExceptionpublic void handle_chat(ChatType type, java.lang.String recipient, java.lang.String chat) throws java.io.IOException
ModTransactionHandlerhandle_chat in interface ModTransactionHandlerjava.io.IOExceptionpublic void handle_info(int seat_num)
throws java.io.IOException
ModTransactionHandlerhandle_info in interface ModTransactionHandlerjava.io.IOExceptionpublic boolean is_spectator()
public int get_seat_num()
public int get_room_id()
public int get_table_id()
public void abort_game()
public void set_server_fd(java.net.Socket fd)
public Module get_module()
public void launch()