Пример #1
0
# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: percent
#       format_version: '1.3'
#       jupytext_version: 1.4.2
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# %%
# %load_ext autoreload
# %autoreload 2
from hat_game.util.util import Game
g = Game(game_name='test21',
         password='******',
         player_name='diego',
         root_game_folder='../../')
g.gui.create_layout()

# %%
g.db.get_players_not_active()

# %%
Пример #2
0
# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: percent
#       format_version: '1.3'
#       jupytext_version: 1.4.2
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# %%
# %load_ext autoreload
# %autoreload 2
from hat_game.util.util import Game
g = Game(game_name='test', password='******', player_name='sara')
g.gui.create_layout()

# %%
g.player_name

# %%
a

# %%
Пример #3
0
# %load_ext autoreload
# %autoreload 2

# %%
from hat_game.util.util import Game

# %%
player_team_dic = {'diego': 'a', 'sara': 'b'}

# %%
g = Game(
    game_name='test21',
    password='******',
    timer_secs=5,
    number_of_words=2,
    number_of_rounds=4,
    admin_mode=True,
    root_game_folder='../',
    player_team_dic=player_team_dic,
    drop_db_if_exist=True,
)

# %%
g.all_show_words()

# %%
g.all_set_center_banner()

# %%
g.db.add_update_config_val('timer_on', '0', 'int')
Пример #4
0
#       extension: .py
#       format_name: percent
#       format_version: '1.3'
#       jupytext_version: 1.4.2
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# %%
# %load_ext autoreload
# %autoreload 2
from hat_game.util.util import Game
g = Game(game_name='test', password='******', player_name='admin',
         drop_db_if_exist=False,
         create_tables=False
         )

# %%
g.db.execute_command_in_all_kernels(
    'g.gui.layout.header.click()')

# %%
g.db.execute_command_in_specific_kernels(
    'a=4',['diego']
    )

# %%
g.db.execute_command_in_specific_kernels(
    'a=2',['sara']
    )
Пример #5
0
# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: percent
#       format_version: '1.3'
#       jupytext_version: 1.4.2
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# %%
# %load_ext autoreload
# %autoreload 2
from hat_game.util.util import Game
g = Game(game_name='GAME_NAME', password='******', player_name='sara')
g.gui.create_layout()

# %%
Пример #6
0
#     language: python
#     name: python3
# ---

# %%
# %load_ext autoreload
# %autoreload 2


# %%
from hat_game.util.util import Game


# %%
player_team_dic = {

}

# %%
g = Game(
    game_name='GAME_NAME', 
    password='******', 
    admin_mode = True,
    root_game_folder='../',
    player_team_dic = player_team_dic,
#     drop_db_if_exist=True,
)


# %%
Пример #7
0
# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: percent
#       format_version: '1.3'
#       jupytext_version: 1.4.2
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# %%
# %load_ext autoreload
# %autoreload 2
from hat_game.util.util import Game
g = Game(game_name='GAME_NAME',
         password='******',
         player_name='PLAYER',
         root_game_folder='../../')
g.gui.create_layout()