Ejemplo n.º 1
0
        private void MoveBallTo(int x, int y)
        {
            var pos = new BallPosition
            {
                X = x,
                Y = y
            };

            BallPosition = pos;
        }
Ejemplo n.º 2
0
        public void InitialBallPlacement(int x, int y)
        {
            if (BallPosition != null)
            {
                throw new Exception("Ballposition must be null");
            }
            var pos = new BallPosition
            {
                X = x,
                Y = y
            };

            //figure out the ballXsection.
            BoardUtils.AddZeroAtPositionInList(x, Rows[y], out var xs);
            BallXSection = xs;
            BoardUtils.AddZeroAtPositionInList(y, Cols[x], out var ys);
            BallYSection = ys;
            BallPosition = pos;
        }