public override bool Interact(HandInteraction getHandInteractionState, IHands hands) { switch (getHandInteractionState) { case HandInteraction.NoHands: return(false); case HandInteraction.Left: if (_hands < 2) { hands.GrabWithLeftHand(this); } break; case HandInteraction.Right: if (_hands < 2) { hands.GrabWithRightHand(this); } break; case HandInteraction.Both: hands.GrabWithBothHands(this); break; default: throw new ArgumentOutOfRangeException(nameof(getHandInteractionState), getHandInteractionState, null); } return(true); }
public override bool Interact(HandInteraction getHandInteractionState, IHands hands) { _isOpen = !_isOpen; _animator.SetBool(isOpen, _isOpen); return(true); }
private void PickUp(HandInteraction getHandInteractionState, IHands hands, Pickup pickup) { if (getHandInteractionState == HandInteraction.Left) { hands.GrabWithLeftHand(pickup); } if (getHandInteractionState == HandInteraction.Right || getHandInteractionState == HandInteraction.Both) { hands.GrabWithRightHand(pickup); } }
public void BuryCards(IHumanPlayer player, List <SheepCard> cards, bool goItAlone, SheepCard?partnerCard) { if (TurnType != TurnType.Bury) { throw new WrongGamePhaseExcpetion("Game must be in the Bury phase."); } if (PartnerMethodEnum == Models.PartnerMethod.JackOfDiamonds || !partnerCard.HasValue) { new PickProcessor().BuryCards(IHands.Last(), player, cards, goItAlone); } else { new PickProcessor().BuryCards(IHands.Last(), player, cards, goItAlone, partnerCard.Value); } }
public List <GameCoins> GameCoins() { var coins = IHands .Select(d => d.CalculateScores()?.Coins) .Where(c => c != null) .ToList(); return(Players .Select(p => new GameCoins() { Name = p.Name, Coins = coins.Sum(c => c[p]) }) .ToList()); }
void Start() { hands = GetComponent <IHands>(); debug = GetComponent <LiveDebug>(); var predictor = new DataBasedAlphabeticPredictor(EnglishWords.AsList()); var layerCreator = new LetterBasedLayerCreator(letters, predictor); knobArranger = new KnobArranger(letters, knobs, layerCreator, new ConsistentAlphabeticLogicalLettersPlacer()); knobArranger.Arrange(0f); var gestures = new Gestures(knobs); gesturesStrategy = new GesturesStrategy(gestures, knobArranger, debug); hands.OnHandUpdate += OnHandUpdate; gesturesStrategy.OnWord += wordSuggester.Suggest; }
public override bool Interact(HandInteraction getHandInteractionState, IHands hands) { if (_isOpen && _content.Count > 0) { var pickup = _content[0]; _content.RemoveAt(0); var contentInstance = Instantiate(pickup, transform); PickUp(getHandInteractionState, hands, contentInstance); } else { _isOpen = !_isOpen; } _animator.SetBool(isOpen, _isOpen); return(true); }
public virtual bool Interact(HandInteraction getHandInteractionState, IHands hands) { return(false); }
public Human(IHands hands) { this.hands = hands; }
public Brain(IHands hands) { this.hands = hands; rand = new Random(); }
public CPU(int number, IHands hands) { this.number = number; this.hands = hands; }