예제 #1
0
        private static void Main(string[] args)
        {
            Pistol pistol = new Pistol();

            pistol.Reload();
            pistol.Fire();
            pistol.Fire();
            pistol.Fire();
            pistol.Fire();
            pistol.Reload();

            Console.ReadLine();
        }
예제 #2
0
        private static void Main(string[] args)
        {
            Pistol pistol = new Pistol();

            pistol.Reload();
            pistol.Fire();
            pistol.Fire();
            pistol.Fire();
            pistol.Fire();
            pistol.Reload();

            Console.ReadLine();
        }
 public EmptyState(Pistol pistol)
 {
     m_pistol = pistol;
 }
 public LoadedState(Pistol pistol)
 {
     m_pistol = pistol;
 }
예제 #5
0
 public EmptyState(Pistol pistol)
 {
     m_pistol = pistol;
 }
예제 #6
0
 public LoadedState(Pistol pistol)
 {
     m_pistol = pistol;
 }