using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Resources; using System.Text; using System.Threading.Tasks; using CDSAE3_Lian_Lian_Kan.Board_funcs; using CDSAE3_Lian_Lian_Kan.Forms; using CDSAE3_Lian_Lian_Kan.Properties; using CDSAE3_Lian_Lian_Kan.Sound; namespace CDSAE3_Lian_Lian_Kan { public static class Etcs { public static int left_time { get; set; } = 180; public static int search_left_time { get; set; } = 20; public enum Difficulty { easy = 0, normal = 1, hard = 2, custom = 3 } public enum Mode { fruit = 0 } public enum Direction { none = 0, up = 1, right = 2, down = 4, left = 8, up_down = 5, left_right = 10, up_right = 3, up_left = 9, down_right = 6, down_left = 12, up_down_right = 7, up_down_left = 13, up_left_right = 11, down_left_right = 14, up_down_left_right = 15 } public enum break_music { breakA, breakB } public static Dictionary decrease_per_level = new Dictionary { {1,100.0/60 }, {2,100.0/45 }, {3,100.0/35 }, {4,100.0/30 }, {5,100.0/25 }, {6,100.0/20 }, {7,100.0/15 }, {8,100.0/10 }, {9,100.0/5 }, {10,100.0/3 }}; static int cus_height = 1, cus_width = 1; public static Difficulty current_difficulty { get; set; } = Difficulty.normal; public static Mode current_mode { get; set; } public static Image trans_Image { get; set; } = Resources.trans; public static (int, int) get_length_width() => current_difficulty != Difficulty.custom ? (7 * (1 + (int)current_difficulty), 4 * (1 + (int)current_difficulty)) : (cus_width,cus_height); public static List block_Images { get; set; } = new List { Resources.Apple, Resources.Banana, Resources.Beetroot, Resources.Cherry, Resources.Corn, Resources.Eggplant, Resources.Grape, Resources.Pear, Resources.Strawberry, Resources.Watermelon }; public static List disappear_Images { get; set; } = new List { Resources.Gapple, Resources.Gbanana, Resources.Gbeetroot, Resources.Gcherry, Resources.Gcorn, Resources.Geggplant, Resources.Ggrape, Resources.Gpear, Resources.Gstrawberry, Resources.Gwatermelon }; public static List direction_Images { get; set; } = new List { Resources.trans, Resources.u, Resources.r , Resources.ur, Resources.d, Resources.ud, Resources.dr, Resources.udr, Resources.l, Resources.ul, Resources.lr, Resources.ulr, Resources.dl, Resources.udl, Resources.dlr, Resources.udlr}; public static List tip_direction_Image { get; set; } = new List { Resources.trans, Resources.tip_u, Resources.tip_r, Resources.tip_ur, Resources.tip_d, Resources.tip_ud, Resources.tip_dr, Resources.tip_udr, Resources.tip_l, Resources.tip_ul, Resources.tip_lr, Resources.tip_ulr, Resources.tip_dl, Resources.tip_udl, Resources.tip_dlr, Resources.tip_udlr }; public static Image get_block_Image(int t) => block_Images[t]; public static Image get_disappear_Images(int t) => disappear_Images[t]; public static Image get_direction_Image(Direction direction) => direction_Images[(int)direction]; public static int Images_size() => current_mode switch { Mode.fruit => 10, _ => 0, }; internal static Image get_tip_direction_Image(Direction direction) => tip_direction_Image[(int)direction]; public static LianLianKan? form { get; set; } public static IGameControl? game_form{ get; set; }//gameBoard public static IGameMode? game_mode_form { get; set; }//entireGame public static Board board { get; set; } = new Board(); public static Color def_Color { get; set; } = Color.FromArgb(0, 0, 0, 0); public static Color sel_Color { get; set; } = Color.FromArgb(0, 122, 204); public static Color mouse_upper_color { get; set; } = Color.FromArgb(97, 97, 108); public static Dictionary> musics { get; set; } = new Dictionary> { { "C418", new List { "C418 - Beginning 2", "C418 - Floating Trees", "C418 - Moog City 2", "C418 - Mutation" } } }; public static Song_Audio_processer song_Audio_Processer { get; set; } = new Song_Audio_processer(); public static Info_Audio_processer info_Audio_Processer { get; set; } = new Info_Audio_processer(); public static ResourceManager res_Manager { get; set; } = new ResourceManager("CDSAE3_Lian_Lian_Kan.Properties.Resources", typeof(Resources).Assembly); public static CultureInfo res_Culture { get; set; } = new CultureInfo("en-US"); public static int Song_Volume { get; set; } = 70; public static int Info_Volume { get; set; } = 70; } }