public void Initialize(Logik.Player.Player p1, Logik.IBrettDarsteller bdar, Logik.Fields.Field field, Network.Network client) { this.client = client; if (p1.Symbol != 'X') { PlayerChange(); } }
public NetworkGame(Logik.Player.Player p1, Logik.Player.Player p2, Logik.IBrettDarsteller bdar, Logik.Fields.Field field, Network.Network client) : base(p1, p2, bdar, field) { client.NewMessageReceivedEvent += ReceiveNewGame; NewGameEvent += SendNewGame; newGameRequestReceivedEvent += NewGame; PlayerMovedEvent += SendVector; Initialize(p1, bdar, field, client); }
public void Initialize(Logik.Player.Player p1, Logik.Player.Player p2, Logik.IBrettDarsteller bdar, Logik.Fields.Field field) { if (field == null) { Field = new Fields.Brett(bdar.Width, bdar.Height); } else { Field = field; } if (p1 is Player.AIPlayer) { p1 = RegisterAIEvents((UniTTT.Logik.Player.AIPlayer)p1); } else if (p2 is Player.AIPlayer) { p2 = RegisterAIEvents((UniTTT.Logik.Player.AIPlayer)p2); } BDarsteller = bdar; Player1 = p1; Player2 = p2; Player = Player1; Initialize(); }
public Game(Logik.Player.Player p1, Logik.Player.Player p2, Logik.IBrettDarsteller bdar, Logik.Fields.Field field) { NewGameEvent += NewGame; Initialize(p1, p2, bdar, field); }