static Hands getNext(Hands[] hands , int last) { return last == hands.Max(x => x.Position) ? hands.First() : hands.Where(x => x.Position > last).First(); }
static Hands GetFirstPlayer(Hands[] hands, bool preflop) { int positionButton = hands.First().PositionButton; if (preflop) { var sb = getNext(hands, positionButton); var bb = getNext(hands, sb.Position); return getNext(hands, bb.Position); } return getNext(hands, positionButton); }