Remove singelton fix bugs
This commit is contained in:
@@ -221,6 +221,7 @@ class PlayerState:
|
||||
def updatePlayfieldTime(self):
|
||||
if self.upperPlayfieldTime == 0:
|
||||
self.upperPlayfieldTimer = None
|
||||
LeaveUpperPlayfieldEvent(self, )
|
||||
return
|
||||
|
||||
if self.upperPlayfieldTime in [0, 5, 10, 20]:
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
networking = None
|
||||
|
||||
import argparse
|
||||
import config
|
||||
|
||||
from factories.NetworkFactory import NetworkFactory
|
||||
from factories.GameFactory import GameFactory
|
||||
|
||||
import asyncio
|
||||
import logging
|
||||
|
||||
networking = None
|
||||
|
||||
def main():
|
||||
args = parseCommandLine()
|
||||
@@ -36,6 +36,7 @@ def createGame(args):
|
||||
print(args)
|
||||
global networking
|
||||
networking = NetworkFactory.createNetwork(args.OutputServerAddress, args.InputServerAddress)
|
||||
from factories.GameFactory import GameFactory
|
||||
game = GameFactory().createGame()
|
||||
return game
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ from solenoids.TopFlipper import TopFlipper
|
||||
|
||||
|
||||
class LeaveUpperPlayfieldEvent(Event):
|
||||
def __init__(self, playerState, flipper):
|
||||
def __init__(self, playerState):
|
||||
self.playerState = playerState
|
||||
self.flipper = TopFlipper()
|
||||
super().__init__("Leave Upper Playfield Event")
|
||||
|
||||
@@ -8,7 +8,7 @@ class Lamp:
|
||||
networking.activateLamp(self)
|
||||
|
||||
def deactivate(self):
|
||||
networking.deactivateLamp()
|
||||
networking.deactivateLamp(self)
|
||||
|
||||
def isActivated(self):
|
||||
networking.getLamps(self)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import requests_unixsocket as req
|
||||
import socket
|
||||
import json
|
||||
import asyncio
|
||||
|
||||
|
||||
class Networking:
|
||||
|
||||
Reference in New Issue
Block a user