Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Windows.Forms;
- namespace Gra_15stka__Forms_
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- for (int i = 0; i < Silnik.Rows; i++)
- {
- for (int j = 0; j < Silnik.Columns; j++)
- {
- this.Controls.Add(Silnik.getButton(i, j));
- }
- }
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- }
- private void bNewGame_Click(object sender, EventArgs e)
- {
- Silnik.NewGame();
- label1.Text = "Liczba wykonanych ruchów: 0";
- }
- private void bUp_Click(object sender, EventArgs e)
- {
- Silnik.Up();
- Silnik.CheckWin(label1);
- }
- private void bDown_Click(object sender, EventArgs e)
- {
- Silnik.Down();
- Silnik.CheckWin(label1);
- }
- private void bLeft_Click(object sender, EventArgs e)
- {
- Silnik.Left();
- Silnik.CheckWin(label1);
- }
- private void button1_Click(object sender, EventArgs e)
- {
- Silnik.Right();
- Silnik.CheckWin(label1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement