예제 #1
0
 public SongManager(Caesura game)
 {
     this.game = game;
     songs     = new Song[4];
     random    = new Random();
     MediaPlayer.IsRepeating = true;
 }
예제 #2
0
        public Board(Caesura game, Random randomItem)
        {
            this.game   = game;
            this.random = randomItem;
            int width  = random.Next(40, 61);
            int height = random.Next(26, 42);

            board = new char[width, height];
        }
예제 #3
0
 public Player(string color, Caesura currentGame, int number)
 {
     playerName   = color;
     playerNumber = number;
     game         = currentGame;
     if (playerNumber == 1)
     {
         bounds       = new BoundingRectangle(0, 0, 20, 20);
         destinationx = (int)bounds.X;
         destinationy = (int)bounds.Y;
     }
     else if (playerNumber == 2)
     {
         bounds       = new BoundingRectangle(game.board.board.GetLength(0) * 20 - 20, game.board.board.GetLength(1) * 20 - 20, 20, 20);
         destinationx = (int)bounds.X;
         destinationy = (int)bounds.Y;
     }
 }
예제 #4
0
 public Entity(string color, Caesura currentGame, int number, Random seed)
 {
     entityName   = color;
     entityNumber = number;
     game         = currentGame;
     random       = seed;
     if (entityNumber == 1)
     {
         bounds       = new BoundingRectangle(0, game.board.board.GetLength(1) * 20 - 20, 20, 20);
         destinationx = (int)bounds.X;
         destinationy = (int)bounds.Y;
     }
     else if (entityNumber == 2)
     {
         bounds       = new BoundingRectangle(game.board.board.GetLength(0) * 20 - 20, 0, 20, 20);
         destinationx = (int)bounds.X;
         destinationy = (int)bounds.Y;
     }
 }
예제 #5
0
 static void Main()
 {
     using (var game = new Caesura())
         game.Run();
 }
예제 #6
0
 public Scoring(Caesura game)
 {
     this.game = game;
 }