-
Notifications
You must be signed in to change notification settings - Fork 1
/
revengeshogi.py
28 lines (22 loc) · 736 Bytes
/
revengeshogi.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# This file is part of Revengeshogi Engine.
# Copyright (C) 2022- SriMethan
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the MIT License.
#
# You should have received a copy of the MIT License along with this
# USI Shogi Engine. If not, view this https://opensource.org/licenses/MIT
import logging
import usi
import sys
def main():
logging.basicConfig(filename='logs.txt', level=logging.INFO, format='%(asctime)s %(message)s')
logging.info('Revengeshogi started')
try:
while True:
msg = input()
usi.commandReceived(msg)
except Exception:
logging.exception('Fatal error in main loop')
if __name__ == '__main__':
main()