Ejemplo n.º 1
0
        public void ReceiveTime(int time)
        {
            Console.WriteLine("Captain received: time is {0}", time);

            Galley.InputTime(time);
            GunDeck.InputTime(time);
            RumHall.InputTime(time);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Receive from Galley type of food crew should eat
        /// </summary>
        public void SetTypeOfFoodToEat(FoodType foodType)
        {
            Console.WriteLine("Captain received: type of food to eat: {0}", foodType);

            // Assume: letting the crew eat

            GunDeck.InputCrewAteType(foodType);
            RumHall.InputFoodAte(foodType);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Receive from RumHall how much the crew should drink
        /// </summary>
        public void SetAmountToDrink(int amount)
        {
            Console.WriteLine("Captain received: amount of rum to drink: {0}", amount);

            // Assume: letting the crew drink

            // let other departments know about it
            GunDeck.InputAmountCrewDrank(amount);
        }
Ejemplo n.º 4
0
        public void ReceiveEnemyDirection(Direction direction)
        {
            Console.WriteLine("Captain received: enemy detected at direction {0}", direction);

            GunDeck.InputEnemiesDirection(direction);
        }