public MetalBlock(Coordinate position, IField owner, ColorSkin color = ConstantValue.COLOR_METAL_BLOCK, SkinBlock skin = SkinBlock.Metal, char charSkin = ConstantValue.METAL_BLOCK) : base(position, color, skin, owner, charSkin) { }
public Block(Coordinate position, ColorSkin color, SkinBlock skin, IField owner, char viewSkin = ConstantValue.BLOCK) : base(position, color, owner) { _skin = skin; _charSkin = viewSkin; }
public IceBlock(Coordinate position, IField owner, ColorSkin color = ConstantValue.COLOR_ICE_BLOCK, SkinBlock skin = SkinBlock.Ice, char charSkin = ConstantValue.ICE_BLOCK) : base(position, color, skin, owner, charSkin) { }
public GrassBlock(Coordinate position, IField owner, ColorSkin color = ConstantValue.COLOR_GRASS_BLOCK, SkinBlock skin = SkinBlock.Grass, char charSkin = ConstantValue.GRASS_BLOCK) : base(position, color, skin, owner, charSkin) { }
public Bullet(Coordinate coordinate, ColorSkin color, IField owner, int range, int atckSpeed, short atckDamage, bool botBullet, SkinBullet skin, Direction direction) : base(coordinate, color, owner) { Range = range; AtackSpeed = atckSpeed; AtackDamage = atckDamage; IsBotBullet = botBullet; Skin = skin; Direction = direction; }
public ColorSkin GetColorSkin(int row, int col) { Coordinate colorCoordinate = new Coordinate(row, col); ColorSkin colorSkin = ColorSkin.NoColor; if (_gameField.IsContain(colorCoordinate)) { colorSkin = _gameField[colorCoordinate].Color; } return(colorSkin); }
private ConsoleColor GetForegColorObject(ColorSkin skin) { ConsoleColor colorObj = ConsoleColor.Black; switch (skin) { case ColorSkin.NoColor: colorObj = ConsoleColor.Black; break; case ColorSkin.Gray: colorObj = ConsoleColor.Gray; break; case ColorSkin.White: colorObj = ConsoleColor.White; break; case ColorSkin.Blue: colorObj = ConsoleColor.Blue; break; case ColorSkin.Red: colorObj = ConsoleColor.Red; break; case ColorSkin.Yellow: colorObj = ConsoleColor.Yellow; break; case ColorSkin.Magenta: colorObj = ConsoleColor.Magenta; break; case ColorSkin.Green: colorObj = ConsoleColor.Green; break; case ColorSkin.DarkGray: colorObj = ConsoleColor.DarkGray; break; default: colorObj = ConsoleColor.Black; break; } return(colorObj); }
static void Main(string[] args) { ISkin colorSkin = new ColorSkin(ConsoleColor.Cyan); ISkin classicSkin = new ClassicSkin(); var player = new Player(classicSkin); var player2 = new Player(colorSkin); //player.Volume = 20; var result = GetSongsData(); var(songs, total, max, min) = result; player.Add(songs); player2.Add(songs); //int min = result.min; //int max = result.max; //int total = result.total; Console.WriteLine($"Min = {min}, max = {max}, total = {total}"); //TraceInfo(player); //player.Play(); player2.Play(); //player.Locked(); //player.Unlock(); player.VolumeUp(); Console.WriteLine(player.Volume); player.VolumeChange(-300); Console.WriteLine(player.Volume); player.VolumeChange(300); Console.WriteLine(player.Volume); /*player.Volume = -25; * Console.WriteLine(player.Volume); */ player.Stop(); player2.Stop(); List <Song> randSongs = new List <Song>(); var randSong = CreateSong(); randSong.LikeMethod(); Artist artist = new Artist("SomeArtist", Artist.Genre.Classic); randSong.Artist = artist; var randSong_2 = CreateSong("Go!"); randSong_2.DisLikeMethod(); var randSong_3 = CreateSong("Signals", 123); var randSong4 = CreateSong("La", 303); var randSong_5 = CreateSong("Lala"); randSong_5.LikeMethod(); var randSong_6 = CreateSong("NewSong"); var randSong7 = CreateSong(); var randSong_8 = CreateSong("Go2!"); var randSong_9 = CreateSong("Signals2", 1230); var randSong10 = CreateSong("La2", 303); randSong10.DisLikeMethod(); var randSong_11 = CreateSong("Lala2"); var randSong_12 = CreateSong("NewSong2"); randSongs.Add(randSong); randSongs.Add(randSong_2); randSongs.Add(randSong_3); randSongs.Add(randSong4); randSongs.Add(randSong_5); randSongs.Add(randSong_6); randSongs.Add(randSong7); randSongs.Add(randSong_8); randSongs.Add(randSong_9); randSongs.Add(randSong10); randSongs.Add(randSong_11); randSongs.Add(randSong_12); player.Add(randSongs); player2.Add(randSongs); player.Load(@"D:\Desktop\songs\"); player.Play(true); //player2.Play(true); player.Shuffle(); player2.Shuffle(); var filteredSongs = FilterByGenre(randSongs, Artist.Genre.Classic); foreach (Song song in filteredSongs) { Console.WriteLine(song.Name.Truncate(3)); } Console.ReadLine(); }
static void Main(string[] args) { ColorSkin ColorSkn = new ColorSkin(ConsoleColor.DarkYellow); ClassicSkin ClassicSkn = new ClassicSkin(); Player player = new Player(ColorSkn); player.Items = new List <Song>(); for (int i = 0; i < 25; i++) { player.Items.Add(new Song { Title = i + "sssssssssss", IsNext = false, Duration = 540, Genre = Genres.Pop }); if (i == 8 || i == 7 || i == 23 || i == 24) { player.Items[i].Genre = Genres.Rock | Genres.Pop; } if (i == 1 || i == 2 || i == 20 || i == 13) { player.Items[i].Genre = Genres.Rock | Genres.Pop | Genres.Electro; } if (i == 3 || i == 5 || i == 15 || i == 22) { player.Items[i].Genre = Genres.Rock | Genres.Metal; } if (i == 3 || i == 7 || i == 23) { player.Items[i].LikeMethod(); } if (i == 5 || i == 8 || i == 22 || i == 21) { player.Items[i].DislikeMethod(); } } Genres testfilter = Genres.Rock | Genres.Pop; List <Song> ListAfterFilter = player.FilterByGenres(player.Items, testfilter); player.ListItem(ListAfterFilter); WriteLine("Now we try to use your keyboard"); while (true) { switch (ReadLine()) { case "a": { player.VolumeUp(); break; } case "s": { player.VolumeDown(); break; } case "d": { player.Play(); break; } case "q": { player.Lock(); break; } case "w": { player.UnLock(); break; } case "e": { player.Start(); break; } case "r": { player.Stop(); break; } } } ReadLine(); }
public BrickBlock(Coordinate position, IField owner, ColorSkin color = ConstantValue.COLOR_BRICK_BLOCK, SkinBlock skin = SkinBlock.Brick, char charSkin = ConstantValue.BRICK_BLOCK) : base(position, color, skin, owner, charSkin) { }
public GameObject(Coordinate position, ColorSkin colorObj, IField owner) { Position = position; Color = colorObj; _owner = owner; }
protected readonly IField _owner; // IField #endregion #region ===--- Constructor ---=== public GameObject(IField field) { Position = new Coordinate(); Color = ColorSkin.NoColor; _owner = field; }
public EnemyTank(CharacteristicTank character, Direction direction, Coordinate coordinate, ColorSkin skin, IField gameField) : base(character, direction, coordinate, skin, gameField) { }
public Tank(CharacteristicTank character, Direction direction, Coordinate coordinate, ColorSkin skin, IField gameField) : base(coordinate, skin, gameField) { Characteristic = character; DirectionTank = direction; }
static void Main(string[] args) { ColorSkin ColorSkn = new ColorSkin(ConsoleColor.Blue); ClassicSkin ClassicSkn = new ClassicSkin(); Player player = new Player(ColorSkn); player.songs = new List <Song>(); for (int i = 0; i < 25; i++) { player.songs.Add(new Song { title = i + "sssssssssss", IsNext = false, duration = 540, songGenre = Genres.Pop }); if (i == 8 || i == 7 || i == 23 || i == 24) { player.songs[i].songGenre = Genres.Rock | Genres.Pop; } if (i == 1 || i == 2 || i == 20 || i == 13) { player.songs[i].songGenre = Genres.Rock | Genres.Pop | Genres.Electro; } if (i == 3 || i == 5 || i == 15 || i == 22) { player.songs[i].songGenre = Genres.Rock | Genres.Metal; } if (i == 3 || i == 7 || i == 23) { player.songs[i].LikeMethod(); } if (i == 5 || i == 8 || i == 22 || i == 21) { player.songs[i].DislikeMethod(); } } Genres testfilter = Genres.Rock | Genres.Pop; List <Song> ListAfterFilter = FilterByGenres(player.songs, testfilter); player.ListSong(ListAfterFilter); // B5-Player2/10. Fields. Song song1 = new Song(); song1.duration = 300; song1.title = "Cvet nastroenia sinii"; //song1.songGenre = "Metal"; song1.lyrics = "lalala"; song1.artist = new Artist { name = "Kirkorov" }; // B5-Player2/10. Fields. Song song2 = new Song(); song2.duration = 300; song2.title = "Anaconda"; //song2.songGenre = "Pop"; song2.lyrics = "lalala"; song2.artist = new Artist { name = "Minaj", band = new Band { bandYear = 1988, isExist = true } }; song2.album = new Album { name = "MinajAlbum", path = "pathAlbum", year = 1988 }; song2.artist.band.bandTitle = "MinajBand"; WriteLine("Now we try to use your keyboard"); while (true) { switch (ReadLine()) { case "a": { player.VolumeUp(); break; } case "s": { player.VolumeDown(); break; } case "d": { player.Play(); break; } case "q": { player.Lock(); break; } case "w": { player.UnLock(); break; } case "e": { player.Start(); break; } case "r": { player.Stop(); break; } } } ReadLine(); }
public Base(Coordinate position, ColorSkin color, IField owner) : base(position, color, owner) { }