Esempio n. 1
0
def start_puzzle_from(filename, index=None):
    if filename.lower().endswith(".pgn"):
        chessfile = PGNFile(
            protoopen(addDataPrefix("learn/puzzles/%s" % filename)))
        chessfile.limit = 1000
        chessfile.init_tag_database()
    elif filename.lower().endswith(".olv"):
        chessfile = OLVFile(
            protoopen(addDataPrefix("learn/puzzles/%s" % filename),
                      encoding="utf-8"))

    records, plys = chessfile.get_records()

    progress = puzzles_solving_progress.get(filename, [0] * chessfile.count)

    if index is None:
        try:
            index = progress.index(0)
        except ValueError:
            index = 0

    rec = records[index]

    timemodel = TimeModel(0, 0)
    gamemodel = LearnModel(timemodel)

    chessfile.loadToModel(rec, 0, gamemodel)

    start_puzzle_game(gamemodel, filename, records, index, rec)
Esempio n. 2
0
def start_lesson_from(filename, index=None):
    if filename.startswith("lichess_study"):
        chessfile = PGNFile(
            protoopen(addDataPrefix("learn/lessons/%s" % filename),
                      encoding="utf-8"))
    else:
        chessfile = PGNFile(
            protoopen(addDataPrefix("learn/lessons/%s" % filename)))
    chessfile.limit = 1000
    chessfile.init_tag_database()
    records, plys = chessfile.get_records()

    progress = lessons_solving_progress.get(filename, [0] * chessfile.count)

    if index is None:
        index = progress.index(0)

    rec = records[index]

    timemodel = TimeModel(0, 0)
    gamemodel = LearnModel(timemodel)
    gamemodel.set_learn_data(LESSON, filename, index, len(records))

    chessfile.loadToModel(rec, -1, gamemodel)

    color = gamemodel.boards[0].color
    player_name = conf.get("firstName", _("You"))

    w_name = player_name if color == WHITE else "PyChess"
    b_name = "PyChess" if color == WHITE else player_name

    p0 = (LOCAL, Human, (WHITE, w_name), w_name)
    p1 = (LOCAL, Human, (BLACK, b_name), b_name)

    def learn_success(gamemodel):
        chessfile.loadToModel(rec, -1, gamemodel)
        progress = lessons_solving_progress[gamemodel.source]
        progress[gamemodel.current_index] = 1
        lessons_solving_progress[gamemodel.source] = progress
        asyncio. async (gamemodel.restart_analyzer(HINT))

    gamemodel.connect("learn_success", learn_success)

    def on_game_started(gamemodel):
        perspective.activate_panel("annotationPanel")
        asyncio. async (gamemodel.start_analyzer(
            HINT, force_engine=discoverer.getEngineLearn()))

    gamemodel.connect("game_started", on_game_started)

    gamemodel.status = WAITING_TO_START
    perspective = perspective_manager.get_perspective("games")
    asyncio. async (perspective.generalStart(gamemodel, p0, p1))
Esempio n. 3
0
    def __init__(self, path, games):
        PGNFile.__init__(self, path, games)
        self.path = path
        self.engine = dbmodel.get_engine(path)
        self.DB_MAXINT_SHIFT = get_maxint_shift(self.engine)

        self.cols = [
            game.c.id.label("Id"),
            pl1.c.name.label('White'),
            pl2.c.name.label('Black'),
            game.c.result.label('Result'),
            event.c.name.label('Event'),
            site.c.name.label('Site'),
            game.c.round.label('Round'),
            game.c.date_year.label('Year'),
            game.c.date_month.label('Month'),
            game.c.date_day.label('Day'),
            game.c.white_elo.label('WhiteElo'),
            game.c.black_elo.label('BlackElo'),
            game.c.ply_count.label('PlyCount'),
            game.c.eco.label('ECO'),
            game.c.time_control.label('TimeControl'),
            game.c.fen.label('Board'),
            game.c.fen.label('FEN'),
            game.c.variant.label('Variant'),
            annotator.c.name.label('Annotator')
        ]

        self.from_obj = [
            game.outerjoin(pl1, game.c.white_id == pl1.c.id).outerjoin(
                pl2, game.c.black_id == pl2.c.id).outerjoin(
                    event, game.c.event_id == event.c.id).outerjoin(
                        site, game.c.site_id == site.c.id).outerjoin(
                            annotator, game.c.annotator_id == annotator.c.id)
        ]

        self.count = self.engine.execute(count_games).scalar()
        log.info("%s contains %s game(s)" % (self.path, self.count),
                 extra={"task": "SQL"})

        self.update_count_stats()

        self.select = select(self.cols, from_obj=self.from_obj)

        self.colnames = self.engine.execute(self.select).keys()

        self.query = self.select
        self.orderby = None
        self.where_tags = None
        self.where_bitboards = None
        self.ply = None
Esempio n. 4
0
def start_lesson_from(filename, index=None):
    chessfile = PGNFile(protoopen(addDataPrefix("learn/lessons/%s" %
                                                filename)))
    chessfile.limit = 1000
    chessfile.init_tag_database()
    records, plys = chessfile.get_records()

    progress = lessons_solving_progress.get(filename, [0] * chessfile.count)

    if index is None:
        index = progress.index(0)

    rec = records[index]

    timemodel = TimeModel(0, 0)
    gamemodel = LearnModel(timemodel)

    chessfile.loadToModel(rec, -1, gamemodel)

    if len(gamemodel.moves) > 0:
        start_lesson_game(gamemodel, filename, chessfile, records, index, rec)
    else:
        start_puzzle_game(gamemodel,
                          filename,
                          records,
                          index,
                          rec,
                          from_lesson=True)
Esempio n. 5
0
 def on_enter_game_clipboard_activate(self, widget):
     ok = False
     clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
     text = clipboard.wait_for_text()
     if text not in [None, '']:
         try:
             pgn = PGNFile(StringIO(text))
             pgn.loadToModel(None)
             newGameDialog.loadPgnAndRun(text)
             ok = True
         except Exception:
             pass
     if not ok:
         dialog = Gtk.MessageDialog(mainwindow(), type=Gtk.MessageType.ERROR, buttons=Gtk.ButtonsType.OK)
         dialog.set_markup(_('The clipboard contains no relevant chess data.'))
         dialog.run()
         dialog.destroy()
Esempio n. 6
0
    def row_activated(self, widget, path, col):
        if path is None:
            return
        filename = addDataPrefix("lectures/%s" % LESSONS[path[0]][0])

        chessfile = PGNFile(protoopen(filename))
        self.importer = PgnImport(chessfile)
        chessfile.init_tag_database(self.importer)
        records, plys = chessfile.get_records()

        rec = records[random.randrange(0, len(records))]
        print(rec)

        timemodel = TimeModel(0, 0)
        gamemodel = GameModel(timemodel)
        gamemodel.set_lesson_game()

        chessfile.loadToModel(rec, -1, gamemodel)

        name = conf.get("firstName", _("You"))
        p0 = (LOCAL, Human, (WHITE, name), name)
        name = "pychessbot"
        p1 = (LOCAL, Human, (BLACK, name), name)

        gamemodel.status = WAITING_TO_START
        perspective = perspective_manager.get_perspective("games")
        asyncio. async (perspective.generalStart(gamemodel, p0, p1))
Esempio n. 7
0
 def loadToModel(self, gameno, position=-1, model=None):
     self.comments = []
     self.comment_idx = 0
     model = PGNFile.loadToModel(self,
                                 gameno,
                                 position=position,
                                 model=model)
     model.game_id = self.games[gameno]["Id"]
     return model
Esempio n. 8
0
 def get_count(self, filename):
     subdir = "puzzles" if self.progress_file.endswith("puzzles.json") else "lessons"
     if filename.lower().endswith(".pgn"):
         chessfile = PGNFile(protoopen(addDataPrefix("learn/%s/%s" % (subdir, filename))))
         chessfile.limit = 1000
         chessfile.init_tag_database()
     elif filename.lower().endswith(".olv"):
         chessfile = OLVFile(protoopen(addDataPrefix("learn/%s/%s" % (subdir, filename)), encoding="utf-8"))
     chessfile.close()
     count = chessfile.count
     return count
Esempio n. 9
0
        def opening():
            # Redirection of the PGN file
            nonlocal filename
            for ext in [".sqlite", ".bin", ".scout"]:
                if filename.endswith(ext):
                    filename = filename[:len(filename) - len(ext)] + ".pgn"

            # Processing by file extension
            if filename.endswith(".pgn"):
                GLib.idle_add(self.progressbar.show)
                GLib.idle_add(self.progressbar.set_text,
                              _("Opening chessfile..."))
                chessfile = PGNFile(protoopen(filename), self.progressbar)
                self.importer = chessfile.init_tag_database()
                if self.importer is not None and self.importer.cancel:
                    chessfile.tag_database.close()
                    if os.path.isfile(chessfile.sqlite_path):
                        os.remove(chessfile.sqlite_path)
                    chessfile = None
                else:
                    chessfile.init_scoutfish()
                    chessfile.init_chess_db()
            elif filename.endswith(".epd"):
                self.importer = None
                chessfile = epd.load(protoopen(filename))
            elif filename.endswith(".olv"):
                self.importer = None
                chessfile = olv.load(protoopen(filename, encoding="utf-8"))
            elif filename.endswith(".fen"):
                self.importer = None
                chessfile = fen.load(protoopen(filename))
            else:
                self.importer = None
                chessfile = None

            GLib.idle_add(self.spinner.stop)
            GLib.idle_add(self.spinner.hide)
            GLib.idle_add(self.progress_dialog.hide)

            if chessfile is not None:
                self.chessfile = chessfile
                self.chessfiles.append(chessfile)
                GLib.idle_add(self.emit, "chessfile_opened0", chessfile)
            else:
                if self.chessfile is None:
                    self.close(None)
Esempio n. 10
0
def start_puzzle_from(filename):
    chessfile = PGNFile(protoopen(addDataPrefix("lectures/%s" % filename)))
    chessfile.limit = 1000
    importer = PgnImport(chessfile)
    chessfile.init_tag_database(importer)
    records, plys = chessfile.get_records()

    rec = records[random.randrange(0, len(records))]

    timemodel = TimeModel(0, 0)
    gamemodel = GameModel(timemodel)
    gamemodel.set_practice_game()
    gamemodel.practice = ("puzzle", filename)

    chessfile.loadToModel(rec, 0, gamemodel)

    # TODO: change colors according to FEN!
    name = rec["White"]
    p0 = (LOCAL, Human, (WHITE, name), name)

    engine = discoverer.getEngineByName(stockfish_name)
    name = rec["Black"]
    ponder_off = True
    p1 = (ARTIFICIAL, discoverer.initPlayerEngine,
          (engine, BLACK, 20, variants[NORMALCHESS], 60, 0, 0,
           ponder_off), name)

    def fix_name(gamemodel, name):
        asyncio. async (gamemodel.start_analyzer(HINT,
                                                 force_engine=stockfish_name))
        gamemodel.players[1].name = name
        gamemodel.emit("players_changed")

    gamemodel.connect("game_started", fix_name, name)

    gamemodel.variant.need_initial_board = True
    gamemodel.status = WAITING_TO_START

    perspective = perspective_manager.get_perspective("games")
    asyncio. async (perspective.generalStart(gamemodel, p0, p1))
Esempio n. 11
0
def start_puzzle_from(filename, index=None):
    if filename.lower().endswith(".pgn"):
        chessfile = PGNFile(protoopen(addDataPrefix("learn/puzzles/%s" % filename)))
        chessfile.limit = 1000
        chessfile.init_tag_database()
    elif filename.lower().endswith(".olv"):
        chessfile = OLVFile(protoopen(addDataPrefix("learn/puzzles/%s" % filename), encoding="utf-8"))

    records, plys = chessfile.get_records()

    progress = puzzles_solving_progress.get(filename, [0] * chessfile.count)

    if index is None:
        index = progress.index(0)

    rec = records[index]

    timemodel = TimeModel(0, 0)
    gamemodel = LearnModel(timemodel)

    chessfile.loadToModel(rec, 0, gamemodel)

    start_puzzle_game(gamemodel, filename, records, index, rec)
Esempio n. 12
0
def start_lesson_from(filename, index=None):
    chessfile = PGNFile(protoopen(addDataPrefix("learn/lessons/%s" % filename)))
    chessfile.limit = 1000
    chessfile.init_tag_database()
    records, plys = chessfile.get_records()

    progress = lessons_solving_progress.get(filename, [0] * chessfile.count)

    if index is None:
        index = progress.index(0)

    rec = records[index]

    timemodel = TimeModel(0, 0)
    gamemodel = LearnModel(timemodel)
    gamemodel.set_learn_data(LESSON, filename, index, len(records))

    chessfile.loadToModel(rec, -1, gamemodel)

    color = gamemodel.boards[0].color
    player_name = conf.get("firstName", _("You"))

    w_name = player_name if color == WHITE else "PyChess"
    b_name = "PyChess" if color == WHITE else player_name

    p0 = (LOCAL, Human, (WHITE, w_name), w_name)
    p1 = (LOCAL, Human, (BLACK, b_name), b_name)

    def learn_success(gamemodel):
        progress = lessons_solving_progress[gamemodel.source]
        progress[gamemodel.current_index] = 1
        lessons_solving_progress[gamemodel.source] = progress
        asyncio.async(gamemodel.restart_analyzer(HINT))
    gamemodel.connect("learn_success", learn_success)

    def start_analyzer(gamemodel):
        asyncio.async(gamemodel.start_analyzer(HINT, force_engine=discoverer.getEngineLearn()))
    gamemodel.connect("game_started", start_analyzer)

    gamemodel.status = WAITING_TO_START
    perspective = perspective_manager.get_perspective("games")
    asyncio.async(perspective.generalStart(gamemodel, p0, p1))
Esempio n. 13
0
        def opening():
            if filename.endswith(".pgn"):
                GLib.idle_add(self.progressbar1.show)
                GLib.idle_add(self.progressbar1.set_text,
                              _("Opening chessfile..."))
                chessfile = PGNFile(protoopen(filename), self.progressbar1)
                self.importer = PgnImport(chessfile)
                chessfile.init_tag_database(self.importer)
                if self.importer.cancel:
                    chessfile.tag_database.close()
                    if os.path.isfile(chessfile.sqlite_path):
                        os.remove(chessfile.sqlite_path)
                    chessfile = None
                else:
                    chessfile.init_scoutfish()
                    chessfile.init_chess_db()
            elif filename.endswith(".epd"):
                self.importer = None
                chessfile = epd.load(protoopen(filename))
            elif filename.endswith(".fen"):
                self.importer = None
                chessfile = fen.load(protoopen(filename))
            else:
                self.importer = None
                chessfile = None

            GLib.idle_add(self.spinner.stop)
            GLib.idle_add(self.progress_dialog.hide)

            if chessfile is not None:
                self.chessfile = chessfile
                self.chessfiles.append(chessfile)
                GLib.idle_add(self.emit, "chessfile_opened0", chessfile)
            else:
                if self.chessfile is None:
                    self.close(None)
Esempio n. 14
0
def start_lesson_from(filename, index=None):
    chessfile = PGNFile(protoopen(addDataPrefix("learn/lessons/%s" % filename)))
    chessfile.limit = 1000
    chessfile.init_tag_database()
    records, plys = chessfile.get_records()

    progress = lessons_solving_progress.get(filename, [0] * chessfile.count)

    if index is None:
        index = progress.index(0)

    rec = records[index]

    timemodel = TimeModel(0, 0)
    gamemodel = LearnModel(timemodel)

    chessfile.loadToModel(rec, -1, gamemodel)

    if len(gamemodel.moves) > 0:
        start_lesson_game(gamemodel, filename, chessfile, records, index, rec)
    else:
        start_puzzle_game(gamemodel, filename, records, index, rec, from_lesson=True)
Esempio n. 15
0
        def opening():
            if filename.endswith(".pgn"):
                GLib.idle_add(self.progressbar.show)
                GLib.idle_add(self.progressbar.set_text, _("Opening chessfile..."))
                chessfile = PGNFile(protoopen(filename), self.progressbar)
                self.importer = chessfile.init_tag_database()
                if self.importer is not None and self.importer.cancel:
                    chessfile.tag_database.close()
                    if os.path.isfile(chessfile.sqlite_path):
                        os.remove(chessfile.sqlite_path)
                    chessfile = None
                else:
                    chessfile.init_scoutfish()
                    chessfile.init_chess_db()
            elif filename.endswith(".epd"):
                self.importer = None
                chessfile = epd.load(protoopen(filename))
            elif filename.endswith(".olv"):
                self.importer = None
                chessfile = olv.load(protoopen(filename, encoding="utf-8"))
            elif filename.endswith(".fen"):
                self.importer = None
                chessfile = fen.load(protoopen(filename))
            else:
                self.importer = None
                chessfile = None

            GLib.idle_add(self.spinner.stop)
            GLib.idle_add(self.spinner.hide)
            GLib.idle_add(self.progress_dialog.hide)

            if chessfile is not None:
                self.chessfile = chessfile
                self.chessfiles.append(chessfile)
                GLib.idle_add(self.emit, "chessfile_opened0", chessfile)
            else:
                if self.chessfile is None:
                    self.close(None)
Esempio n. 16
0
def start_puzzle_from(filename, index=None):
    if filename.lower().endswith(".pgn"):
        if filename.startswith("lichess_study"):
            chessfile = PGNFile(
                protoopen(addDataPrefix("learn/puzzles/%s" % filename),
                          encoding="utf-8"))
        else:
            chessfile = PGNFile(
                protoopen(addDataPrefix("learn/puzzles/%s" % filename)))
        chessfile.limit = 1000
        chessfile.init_tag_database()
    elif filename.lower().endswith(".olv"):
        chessfile = OLVFile(
            protoopen(addDataPrefix("learn/puzzles/%s" % filename),
                      encoding="utf-8"))

    records, plys = chessfile.get_records()

    progress = puzzles_solving_progress.get(filename, [0] * chessfile.count)

    if index is None:
        index = progress.index(0)

    rec = records[index]

    timemodel = TimeModel(0, 0)
    gamemodel = LearnModel(timemodel)
    gamemodel.set_learn_data(PUZZLE, filename, index, len(records))

    chessfile.loadToModel(rec, 0, gamemodel)

    engine = discoverer.getEngineByName(discoverer.getEngineLearn())
    ponder_off = True

    color = gamemodel.boards[0].color

    w_name = "" if rec["White"] is None else rec["White"]
    b_name = "" if rec["Black"] is None else rec["Black"]

    player_name = conf.get("firstName", _("You"))
    engine_name = discoverer.getName(engine)

    if rec["Event"].startswith("Lichess Practice"):
        w_name = player_name if color == WHITE else engine_name
        b_name = engine_name if color == WHITE else player_name

    opp_name = engine_name if rec["Event"].startswith(
        "Lichess Practice") else b_name

    if color == WHITE:
        p0 = (LOCAL, Human, (WHITE, w_name), w_name)
        p1 = (ARTIFICIAL, discoverer.initPlayerEngine,
              (engine, BLACK, 20, variants[NORMALCHESS], 20, 0, 0,
               ponder_off), b_name)
    else:
        p0 = (ARTIFICIAL, discoverer.initPlayerEngine,
              (engine, WHITE, 20, variants[NORMALCHESS], 20, 0, 0,
               ponder_off), w_name)
        p1 = (LOCAL, Human, (BLACK, b_name), b_name)

    def on_game_started(gamemodel, name, color):
        perspective.activate_panel("annotationPanel")
        asyncio. async (gamemodel.start_analyzer(
            HINT, force_engine=discoverer.getEngineLearn()))
        gamemodel.players[1 - color].name = name
        gamemodel.emit("players_changed")

    gamemodel.connect("game_started", on_game_started, opp_name, color)

    def goal_checked(gamemodle):
        if gamemodel.reason == PRACTICE_GOAL_REACHED:
            progress = puzzles_solving_progress[gamemodel.source]
            progress[gamemodel.current_index] = 1
            puzzles_solving_progress[gamemodel.source] = progress

    gamemodel.connect("goal_checked", goal_checked)

    gamemodel.variant.need_initial_board = True
    gamemodel.status = WAITING_TO_START

    perspective = perspective_manager.get_perspective("games")
    asyncio. async (perspective.generalStart(gamemodel, p0, p1))
Esempio n. 17
0
else:
    DATA_FILES += [("share/pychess/sounds", glob('sounds/*.ogg'))]
DATA_FILES += [('share/icons/hicolor/24x24/apps', ['pychess.png'])]
DATA_FILES += [('share/gtksourceview-3.0/language-specs',
                ['gtksourceview-3.0/language-specs/pgn.lang'])]

# Piece sets
DATA_FILES += [("share/pychess/pieces", glob('pieces/*.png'))]

if not isfile(os.path.abspath("learn/puzzles/mate_in_4.sqlite")):
    from pychess.Savers.pgn import PGNFile
    from pychess.System.protoopen import protoopen

    # Lectures, puzzles, lessons
    for filename in glob('learn/puzzles/*.pgn'):
        chessfile = PGNFile(protoopen(filename))
        chessfile.init_tag_database()

    for filename in glob('learn/lessons/*.pgn'):
        chessfile = PGNFile(protoopen(filename))
        chessfile.init_tag_database()

DATA_FILES += [("share/pychess/learn/puzzles", glob('learn/puzzles/*.olv'))]
DATA_FILES += [("share/pychess/learn/puzzles", glob('learn/puzzles/*.pgn'))]
DATA_FILES += [("share/pychess/learn/puzzles", glob('learn/puzzles/*.sqlite'))]
DATA_FILES += [("share/pychess/learn/lessons", glob('learn/lessons/*.pgn'))]
DATA_FILES += [("share/pychess/learn/lessons", glob('learn/lessons/*.sqlite'))]
DATA_FILES += [("share/pychess/learn/lectures", glob('learn/lectures/*.txt'))]

for dir in [d for d in listdir('pieces') if isdir(os.path.join('pieces', d))]:
    DATA_FILES += [("share/pychess/pieces/" + dir,
Esempio n. 18
0
def start_puzzle_from(filename, index=None):
    if filename.lower().endswith(".pgn"):
        chessfile = PGNFile(protoopen(addDataPrefix("learn/puzzles/%s" % filename)))
        chessfile.limit = 1000
        chessfile.init_tag_database()
    elif filename.lower().endswith(".olv"):
        chessfile = OLVFile(protoopen(addDataPrefix("learn/puzzles/%s" % filename), encoding="utf-8"))

    records, plys = chessfile.get_records()

    progress = puzzles_solving_progress.get(filename, [0] * chessfile.count)

    if index is None:
        index = progress.index(0)

    rec = records[index]

    timemodel = TimeModel(0, 0)
    gamemodel = LearnModel(timemodel)

    chessfile.loadToModel(rec, 0, gamemodel)
    gamemodel.set_learn_data(PUZZLE, filename, index, len(records))

    engine = discoverer.getEngineByName(discoverer.getEngineLearn())
    ponder_off = True

    color = gamemodel.boards[0].color

    w_name = "" if rec["White"] is None else rec["White"]
    b_name = "" if rec["Black"] is None else rec["Black"]

    player_name = conf.get("firstName", _("You"))
    engine_name = discoverer.getName(engine)

    if rec["Event"].startswith("Lichess Practice"):
        w_name = player_name if color == WHITE else engine_name
        b_name = engine_name if color == WHITE else player_name

    opp_name = engine_name if rec["Event"].startswith("Lichess Practice") else b_name

    if color == WHITE:
        p0 = (LOCAL, Human, (WHITE, w_name), w_name)
        p1 = (ARTIFICIAL, discoverer.initPlayerEngine,
              (engine, BLACK, 20, variants[NORMALCHESS], 20, 0, 0, ponder_off), b_name)
    else:
        p0 = (ARTIFICIAL, discoverer.initPlayerEngine,
              (engine, WHITE, 20, variants[NORMALCHESS], 20, 0, 0, ponder_off), w_name)
        p1 = (LOCAL, Human, (BLACK, b_name), b_name)

    def start_analyzer(gamemodel, name, color):
        asyncio.async(gamemodel.start_analyzer(HINT, force_engine=discoverer.getEngineLearn()))
        gamemodel.players[1 - color].name = name
        gamemodel.emit("players_changed")
    gamemodel.connect("game_started", start_analyzer, opp_name, color)

    def goal_checked(gamemodle):
        if gamemodel.reason == PRACTICE_GOAL_REACHED:
            progress = puzzles_solving_progress[gamemodel.source]
            progress[gamemodel.current_index] = 1
            puzzles_solving_progress[gamemodel.source] = progress
    gamemodel.connect("goal_checked", goal_checked)

    gamemodel.variant.need_initial_board = True
    gamemodel.status = WAITING_TO_START

    perspective = perspective_manager.get_perspective("games")
    asyncio.async(perspective.generalStart(gamemodel, p0, p1))