cowiz20/server.py

49 lines
994 B
Python
Raw Normal View History

2020-04-05 16:00:48 +02:00
#!/usr/bin/env python3
2020-04-01 23:31:36 +02:00
2020-04-05 16:00:48 +02:00
import random
import socket
import responder
from app_instance import api
from routes import *
import wiz_game
2020-04-01 23:31:36 +02:00
2020-04-05 16:00:48 +02:00
def main():
print("main started")
2020-04-01 23:31:36 +02:00
2020-04-05 16:00:48 +02:00
random.seed()
2020-04-01 23:31:36 +02:00
2020-04-05 16:00:48 +02:00
wiz_game.the_game.create_deck()
wiz_game.the_game.add_player("p1", 1)
wiz_game.the_game.add_player("p2", 2)
wiz_game.the_game.add_player("p3", 3)
2020-04-05 23:27:33 +02:00
#wiz_game.the_game.add_player("p4", 4)
wiz_game.the_game.deal_cards(12)
2020-04-01 23:31:36 +02:00
2020-04-05 16:00:48 +02:00
api.run(port=19203, address="127.0.0.1")
2020-04-01 23:31:36 +02:00
exit(0)
2020-04-05 16:00:48 +02:00
# w.create_deck()
# w.add_player("p1", 1)
# w.add_player("p2", 2)
# w.add_player("p3", 3)
# w.add_player("p4", 4)
# w.deal_cards(1)
# print("round 2")
# w.deal_cards(2)
# print("round 3")
# w.deal_cards(3)
# print("round 4")
# w.deal_cards(4)
# print("round 12")
# w.deal_cards(12)
# print("round 13")
# w.deal_cards(13)
# print("round 14")
# w.deal_cards(14)
# print("round 15")
# w.deal_cards(15)
2020-04-01 23:31:36 +02:00
if __name__ == '__main__':
main()