protected override void OnStartup(StartupEventArgs e) { //HubConnection connection = new HubConnectionBuilder() // .WithUrl("https://margesignalr20201107074704.azurewebsites.net/margechat") // .Build(); ConnectionProxy connectionProxy = new ConnectionProxy(); var player = new PlayerBuilder(); player.BuildPlayerName(); player.BuildPlayerColor(); player.BuildPlayerPos(); var enemy = new EnemyBuilder(); enemy.BuildPlayerName(); enemy.BuildPlayerColor(); enemy.BuildPlayerPos(); enemy.passConnection(connectionProxy); var darkenBoard = new Darken(); Board board = new Board(darkenBoard); BoardCoordinatesViewModel chatViewModel = BoardCoordinatesViewModel.CreateConnectedViewModel(connectionProxy, player.GetPlayer(), enemy.GetEnemy(), board); MainWindow window = new MainWindow { DataContext = new MainViewModel(chatViewModel, board) }; window.Show(); NeutralTileFactory factory = new NeutralTileFactory(); for (int i = 0; i < 5; i++) { AbstractNeutralTile tile = factory.GetNeutralTile("Darkest"); tile.Display(connectionProxy); } for (int i = 0; i < 5; i++) { AbstractNeutralTile tile = factory.GetNeutralTile("Lightest"); tile.Display(connectionProxy); } }
public MoveUpChatMessageCommand(BoardCoordinatesViewModel viewModel, ConnectionProxy chatService, Player player) { _viewModel = viewModel; _chatService = chatService; CurrentPlayer = player; }
public Pause(BoardCoordinatesViewModel viewModel, ConnectionProxy chatService) { _viewModel = viewModel; _chatService = chatService; }