public TestWindow() { InitializeComponent(); kinematics = new Kinematics(); imageProcessing = new ImageProcessing(pictureBox1); gameLogics = new GameLogics(kinematics, imageProcessing); }
void Awake() { if (gameLogics == null) { gameLogics = GameObject.FindWithTag("GameLogics").GetComponent <GameLogics> (); } }
public FormGame() { m_GameLogics = new GameLogics(); m_GameLogics.MaxOfGeuss = FormSettings.NumberOfChances; InitializeComponent(); GuessesComponent(); InitializeColorsToChar(); }
void InitAll() { _objHolder = new ObjectHolder(); _destManager = new DestructionManager(_objHolder); _collManager = new CollisionManager(_objHolder); _initSceneSpawn = new InitialSceneSpawner(_objHolder, _collManager); _gameLogics = new GameLogics(_objHolder); _mouseTrack = new MouseTracker(); _keyboardTrack = new KeyBoardTracker(); }
private async void SreateNewGame(object sender, EventArgs e) { var board = GameLogics.LogicsBuilder(). SetHeigth(boardHeigth). SetWidth(boardWidth). Cyclic(true). NumberOfEnemies(6). BuildLogics().GenerateBoard(); await StartGame(board); }
private async void CreateNewGame(object sender, RoutedEventArgs e) { int heigth = (int)HeigthSlider.Value; int width = (int)WidthSlider.Value; var board = GameLogics.LogicsBuilder(). SetHeigth(heigth). SetWidth(width). Cyclic(CyclicCheckBox.IsChecked.Value). NumberOfEnemies((int)Enemies.Value). BuildLogics().GenerateBoard(); await StartGame(board); }
private void NweGame(object sender, EventArgs e) { int heigth = 200; int width = 200; var board = GameLogics.LogicsBuilder(). SetHeigth(heigth). SetWidth(width). Cyclic(true). NumberOfEnemies(10). BuildLogics().GenerateBoard(); await StartGame(board); }
public void BoardInitCycle() { GameLogics g = GameLogics.LogicsBuilder() .SetHeigth(50) .SetWidth(70) .Cyclic(true) .NumberOfEnemies(5) .BuildLogics(); Assert.AreEqual(50, g.BoardHiegth); Assert.AreEqual(70, g.BoardWidth); Assert.AreEqual(5, g.CreateEnemies().Count); }
public TestForm() { InitializeComponent(); gameLogics = new GameLogics(Piece.O); kinematics = new Kinematics(); imageProcessor = new Camera(); // setting up the communication between the modules: gameLogics.PostMessageShowRequest += PostMessageHandler; // game logics handles its own post messages kinematics.PostMessageShowRequest += PostMessageHandler; // game logics handles the post messages of the kinematics imageProcessor.PostMessageShowRequest += PostMessageHandler; // game logics handles the post messages of the image processing kinematics.RobotStatusChanged += gameLogics.RobotStatusChangedHandler; // game logics handles the changes of the robot arm status (source: kinematics) gameLogics.RobotMovementReqest += kinematics.RobotMovementRequestHandler; // kinematics handles the robot movement requests (source: game logics) imageProcessor.TableStateChanged += gameLogics.TableSetupChangedHandler; imageProcessor.GameStatusChanged += new EventHandler <InterfaceModule.GameStatusChangedEventArgs>(cam1_CameraStatusChanged); imageProcessor.NextPieceChanged += gameLogics.NextPieceChangedHandler; imageProcessor.Init(pictureBox1, pictureBox2, pictureBox3, 17, 452, 200, 500, 359, 10, "Consolas"); }
private async void LoadGame(object sender, RoutedEventArgs e) { _engine?.Pause(); OpenFileDialog dlg = new OpenFileDialog(); // Show save file dialog box var result = dlg.ShowDialog(); // Process save file dialog box results if (result == true) { var state = JsonSerializer.Deserialize <State>( await File.ReadAllTextAsync(dlg.FileName)); HeigthSlider.Value = state.BoardHeigth; WidthSlider.Value = state.BoardWidth; var board = GameLogics. LogicsBuilder(). FromSate(state). GenerateBoard(); await StartGame(board); } }
/// <summary> /// The main form of the program. /// </summary> public RoboTicTacToe() { InitializeComponent(); // creating the components: gameLogics = new GameLogics(Piece.O); kinematics = new Kinematics(); imageProcessor = new Camera(); // establishing communication: gameLogics.PostMessageShowRequest += PostMessageHandler; kinematics.PostMessageShowRequest += PostMessageHandler; imageProcessor.PostMessageShowRequest += PostMessageHandler; kinematics.RobotStatusChanged += gameLogics.RobotStatusChangedHandler; // game logics handles the changes of the robot arm status (source: kinematics) gameLogics.RobotMovementReqest += kinematics.RobotMovementRequestHandler; // kinematics handles the robot movement requests (source: game logics) imageProcessor.TableStateChanged += gameLogics.TableSetupChangedHandler; imageProcessor.NextPieceChanged += gameLogics.NextPieceChangedHandler; imageProcessor.GameStatusChanged += new EventHandler <InterfaceModule.GameStatusChangedEventArgs>(gameStatusChanged); // initialisation: imageProcessor.Init(pictureBox1, pictureBox2, pictureBox3, 17, 452, 200, 500, 359, 10, "Consolas"); }
public Game() { m_GameLogics = new GameLogics(); m_GameLogics.MaxOfGeuss = Dialogs.GetNumberOfGeussFromUser(); m_Board = new Board(m_GameLogics.MaxOfGeuss); }
public GameBoard(GameLogics gameLogics) { _logics = gameLogics; _player = gameLogics.CreatePlayer(); _enemies = gameLogics.CreateEnemies(); }