コード例 #1
0
 public void Draw(DartThrow _dartThrow, bool clear = true)
 {
     if (clear)
     {
         Console.Clear();
     }
     this.StatusBar(_dartThrow);
 }
コード例 #2
0
        void StatusBarItems(DartThrow _dartThrow)
        {
            var    tsi  = ThrowStatusItems(_dartThrow);
            String line = barVertBorder;

            tsi.ForEach(item => line += item.Key + ":" + item.Value + barVertBorder);
            line += RepeatString(placeholder, (width - line.Length));

            Console.WriteLine(line);
        }
コード例 #3
0
        List <KeyValuePair <string, string> > ThrowStatusItems(DartThrow _dartThrow)
        {
            var retVal = new List <KeyValuePair <string, string> >();

            retVal.Add(new KeyValuePair <string, string>("X", _dartThrow.xCoord.ToString()));
            retVal.Add(new KeyValuePair <string, string>("Y", _dartThrow.yCoord.ToString()));
            retVal.Add(new KeyValuePair <string, string>("Hit", _dartThrow.hitTheBoard.ToString()));
            retVal.Add(new KeyValuePair <string, string>("Points", _dartThrow.points.ToString()));
            retVal.Add(new KeyValuePair <string, string>("Multi", _dartThrow.multiplicator.ToString()));
            retVal.Add(new KeyValuePair <string, string>("Slot", _dartThrow.pointSlot.ToString()));
            return(retVal);
        }
コード例 #4
0
 void StatusBarBoarder(DartThrow _dartThrow)
 {
     Console.WriteLine(RepeatString(barHorizBorder, width));
 }
コード例 #5
0
 void StatusBar(DartThrow _dartThrow)
 {
     this.StatusBarBoarder(_dartThrow);
     this.StatusBarItems(_dartThrow);
     this.StatusBarBoarder(_dartThrow);
 }