Ejemplo n.º 1
0
 public ControllerMainWindow(int fieldSize, int ammountOfTanks, int ammountOfApples, int gameSpeed)
 {
     InitializeComponent();
     gameModel        = new GameModel(fieldSize, ammountOfTanks, ammountOfApples, gameSpeed);
     kolobokModel     = new KolobocModel();
     kolobokConroller = new KolobocController(kolobokModel);
     gameView         = new GameView(kolobokConroller);
     gameView.Width   = fieldSize;
     gameView.Height  = fieldSize;
     this.Controls.Add(gameView);
     SetOtherFormObjectPosition(fieldSize);
 }
Ejemplo n.º 2
0
 private void btnNewGame_Click(object sender, EventArgs e) //???
 {
     gameModel.DestroyAll();
     this.Controls.Remove(gameView);
     gameModel        = new GameModel(GameModel.fieldSize, GameModel.ammountOfTanks, GameModel.ammountOfApples, GameModel.gameSpeed);
     kolobokModel     = new KolobocModel();
     kolobokConroller = new KolobocController(kolobokModel);
     gameView         = new GameView(kolobokConroller);
     gameView.Width   = GameModel.fieldSize;
     gameView.Height  = GameModel.fieldSize;
     this.Controls.Add(gameView);
     SetOtherFormObjectPosition(GameModel.fieldSize);
 }
Ejemplo n.º 3
0
 public KolobocController(KolobocModel kolobokModel)
 {
     this.kolobokModel = kolobokModel;
 }