摘要:
根据是否结束游戏的逻辑选择对掷骰子的过程用bool构建函数 掷骰子 static bool RollDice (w,h,ref Player p1,ref Player p2,Map map) { InfoClear(h); Console.ForegroundColor=p1.type==E_Pl 阅读全文
posted @ 2024-12-18 21:48
cannedmint
阅读(27)
评论(0)
推荐(0)
摘要:
玩家结构体包含了玩家类型,玩家位置,玩家初始化构造函数还有画自己的函数方法 玩家结构体 enum E_PlayerType//玩家类型的枚举 { Player, Robot, } struct Player { public E_PlayerType type; //用地图上的索引代替坐标 publ 阅读全文
posted @ 2024-12-18 20:11
cannedmint
阅读(43)
评论(0)
推荐(0)
摘要:
地图结构体包含可格子数组、地图初始化构造函数、画地图的函数方法。 地图结构体 struct Map { public Grid[] grids;//声明一个变量类型为Grid的数组在结构体中不用初始化 public Map(int x,int y,int num) // 创建构造函数,传入下x,y作 阅读全文
posted @ 2024-12-18 17:48
cannedmint
阅读(21)
评论(0)
推荐(0)

浙公网安备 33010602011771号