This repository has been archived on 2024-06-21. You can view files and clone it, but cannot push or open issues or pull requests.
CDSAE3/CDSAE3_Lian_Lian_Kan/Settings.cs

69 lines
2.9 KiB
C#
Raw Normal View History

2024-03-22 09:03:01 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
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;
namespace CDSAE3_Lian_Lian_Kan
{
public class Settings
{
public static int left_time { get; set; } = 180;
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
}
public static Dictionary<int, double> decrease_per_level = new Dictionary<int, double> {
{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.easy;
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<Image> block_Images { get; set; } = new List<Image> { Resources.Apple, Resources.Banana, Resources.Beetroot, Resources.Cherry, Resources.Corn, Resources.Eggplant, Resources.Grape, Resources.Pear, Resources.Strawberry, Resources.Watermelon };
public static List<Image> disappear_Images { get; set; } = new List<Image> { Resources.Gapple, Resources.Gbanana, Resources.Gbeetroot, Resources.Gcherry, Resources.Gcorn, Resources.Geggplant, Resources.Ggrape, Resources.Gpear, Resources.Gstrawberry, Resources.Gwatermelon };
public static Image get_block_Image(int t) => block_Images[t];
public static Image get_disappear_Images(int t) => disappear_Images[t];
public static int Images_size() => current_mode switch { Mode.fruit => 10, _ => 0, };
public static LianLianKan? form { get; set; }
public static IBeSelected? 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);
}
}