26 lines
710 B
Python
26 lines
710 B
Python
import logging
|
|
|
|
from sqlalchemy import create_engine
|
|
from sqlalchemy.orm import Session
|
|
from star_resonance_tracer.proto.enum_chit_chat_channel_type_pb2 import ChitChatChannelType
|
|
|
|
from inventory_wars.game import Game
|
|
from inventory_wars.models import Base
|
|
from inventory_wars.scoring import FirstGuess, HighestAmount
|
|
|
|
logging.basicConfig(level=logging.INFO)
|
|
|
|
engine = create_engine("sqlite:///app.db")
|
|
Base.metadata.create_all(engine)
|
|
|
|
game = Game(Session(engine), listening_channels=[ChitChatChannelType.ChannelTeam])
|
|
while True:
|
|
item_id = input("Enter item id to start: ")
|
|
if not item_id:
|
|
break
|
|
|
|
game.start(int(item_id), HighestAmount())
|
|
|
|
input("Enter to end game. ")
|
|
game.end()
|