示例#1
0
        public bool IsValidMovementLeft(Player player, Gameboard gameboard)
        {
            Player playerL = new Player(new Vector2(player.Position.X - 1, player.Position.Y));

            playerL.Size = player.Size;
            return(gameboard.IncludesGameObject(playerL));
        }
示例#2
0
        public bool IsValidMovementRight(Player player, Gameboard gameboard)
        {
            Player playerR = new Player(new Vector2(player.Position.X + 1, player.Position.Y));

            playerR.Size = player.Size;
            return(gameboard.IncludesGameObject(playerR));
        }
示例#3
0
 public Game(int width, int height, string level)
 {
     Width  = width;
     Height = height;
     Player = CreatePlayer();
     GobjectList.Add(Player);
     Ball      = CreateBall();
     Gameboard = new Gameboard(width, height, level, GobjectList);
     GobjectList.Add(Gameboard);
 }