本文整理汇总了C#中Row.pins方法的典型用法代码示例。如果您正苦于以下问题:C# Row.pins方法的具体用法?C# Row.pins怎么用?C# Row.pins使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Row
的用法示例。
在下文中一共展示了Row.pins方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: logic
public void logic(Random rnd)
{
Manager manager = new Manager(rnd);
Row a = new Row();
int count = 0;
do
{
if (manager.possibilities.Count == 0)
{
Console.WriteLine("mistake");
break;
}
a = manager.possibilities[rnd.Next(manager.possibilities.Count - 1)] as Row;
a.pins(manager.answer, a);
graphics(count, a,manager);
//goes therw the hole array from up to down and ereases the not possiable options
for (int i = manager.possibilities.Count - 1; i >= 0; i--)
{
Row check = manager.possibilities[i] as Row;
int samePlace = HowManySamePlace(a, check);
int amount = HowManySameAll(a, check);
//the logic
if (a.black_pins != samePlace || amount > a.white_pins + a.black_pins)
manager.possibilities.RemoveAt(i);
}
count++;
} while (a.black_pins < 4);
//function that checks how many are at the same place
}