Ejemplo n.º 1
0
        private void changeBoat(Member member)
        {
            Boat       selectedBoat = this._view.getChosenBoat(member);
            ChangeBoat menuChoice   = this._menuView.getChangeBoatChoice();

            this.handleChangeBoat(selectedBoat, menuChoice);
        }
Ejemplo n.º 2
0
        private void handleChangeBoat(Boat boat, ChangeBoat menuChoice)
        {
            if (menuChoice == ChangeBoat.GoBack)
            {
                return;
            }

            if (menuChoice == ChangeBoat.ChangeType)
            {
                this._registry.updateBoatList(boat, this._view.getBoatType());
            }

            if (menuChoice == ChangeBoat.ChangeLength)
            {
                this.tryUpdateBoatLength(boat);
            }
        }