import sfml as sf from state import StateManager from states.gamestate import GameState """ A card game prototype """ if __name__ == '__main__': window = sf.RenderWindow(sf.VideoMode(1920, 1080), "Card Game", sf.Style.FULLSCREEN) window.vertical_synchronization = True clock = sf.Clock() sm = StateManager() sm.add_state("game", GameState, True) while window.is_open: dt = clock.restart().seconds state = sm.get() for event in window.events: state.handle_event(event) if type(event) == sf.CloseEvent: window.close() state.tick(dt) window.clear() state.draw(window) window.display()