Ejemplo n.º 1
0
 public GamePlayer(Game game, Player player)
 {
     Id = Guid.NewGuid();
     Items.Add(Id, this);
     Game = game;
     Player = player;
 }
Ejemplo n.º 2
0
        public Sector(Game game, Point p)
        {
            Id = Guid.NewGuid();
            Coord = p;
            Game = game;
            Size = new Size(Side, Side);
            SetImage("sector_up.gif");
            BackgroundImageLayout = ImageLayout.Zoom;
            DrawSector();
            BackgroundIndex = 0;

            Items.Add(Id, this);
        }
Ejemplo n.º 3
0
 public Player(Game game,string name, BallPoint.BallColor color)
 {
     Id = Guid.NewGuid();
     Name = name;
     PlayerColor = color;
     HorizLine = 0;
     MaxHLine = 0;
     VertLine = 0;
     MaxVLine = 0;
     DiagLeftLine = 0;
     MaxDLLine = 0;
     DiagRightLine = 0;
     MaxDRLine = 0;
     Items.Add(Id, this);
 }
Ejemplo n.º 4
0
        private void btnPlay_Click(object sender, EventArgs e)
        {
            PlayerCount = Convert.ToInt16(cbPlayerCount.Text);

            switch (cbSectorCount.Text)
            {
                case "4":
                case "4 (2 х 2)":
                    GameField.SectorCount = 2;
                    break;
                case "9":
                case "9 (3 х 3)":
                    GameField.SectorCount = 3;
                    break;
                case "16":
                case "16 (4 х 4)":
                    GameField.SectorCount = 4;
                    break;
                case "25":
                case "25 (5 х 5)":
                    GameField.SectorCount = 5;
                    break;
            }

            Player1Name = tbName1.Text;
            Player2Name = tbName2.Text;
            Player3Name = tbName3.Text;
            Player4Name = tbName4.Text;
            Player5Name = tbName5.Text;
            Player6Name = tbName6.Text;
            Player7Name = tbName7.Text;
            Player8Name = tbName8.Text;

            Player1Color = BallPoint.BallColor.red;
            Player2Color = BallPoint.BallColor.green;
            Player3Color = BallPoint.BallColor.blue;
            Player4Color = BallPoint.BallColor.cyan;
            Player5Color = BallPoint.BallColor.magenta;
            Player6Color = BallPoint.BallColor.yellow;
            Player7Color = BallPoint.BallColor.black;
            Player8Color = BallPoint.BallColor.brown;

            Game = new Game(Field);
            Field.Game = Game;
            Game.CreatePlayers(this);

            IsFinish = false;
            Close();
        }