Beispiel #1
0
        public void ShowPlayerStatus()
        {
            for (int player = 0; player < 4; player++)
            {
                int location = GetPlayerLocation(player);

                PlayerInfo playerInfo = mahjongLogic.GetPlayerInfo(player);

                lblsPlayerPoint[location].Content = $"{playerInfo.points}";

                string[] winds = { "东", "南", "西", "北" };
                string   wind  = $"{ winds[GetPlayerOrder(player)]}, {player}";

                lblsPlayerWind[location].Content = wind;

                if (player == mahjongLogic.Playing)
                {
                    lblsPlayerWind[location].Foreground = System.Windows.Media.Brushes.Red;
                }
                else
                {
                    lblsPlayerWind[location].Foreground = System.Windows.Media.Brushes.White;
                }
            }
        }