Skip to content

Commit

Permalink
compatible with Akagi riichi library
Browse files Browse the repository at this point in the history
  • Loading branch information
latorc committed Mar 31, 2024
1 parent 5b4c553 commit f1b02ce
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
6 changes: 4 additions & 2 deletions game_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
from liqi import MsgType
from liqi import LiqiProto, LiqiMethod, LiqiAction


import libriichi
try:
import libriichi
except:
import riichi as libriichi
import mj_helper
from mj_helper import MJAI_TYPE, GameInfo
from mjai.engine import MortalEngine
Expand Down
14 changes: 4 additions & 10 deletions libriichi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
try:
from .libriichi import *
from .libriichi import *

__doc__ = libriichi.__doc__
if hasattr(libriichi, "__all__"):
__all__ = libriichi.__all__
except Exception as e:
from .riichi import *
__doc__ = libriichi.__doc__
if hasattr(libriichi, "__all__"):
__all__ = libriichi.__all__

__doc__ = riichi.__doc__
if hasattr(riichi, "__all__"):
__all__ = riichi.__all__
"""
Submodule: arena
Module: libriichi.libriichi.arena
Expand Down
Binary file removed libriichi/riichi.pyd
Binary file not shown.
5 changes: 4 additions & 1 deletion mjai/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
from torch.distributions import Normal, Categorical
from typing import *
from functools import partial
import libriichi
try:
import libriichi
except:
import riichi as libriichi


class ChannelAttention(nn.Module):
Expand Down

0 comments on commit f1b02ce

Please sign in to comment.