title: how to return bool value from method
body: <p>I have a while loop that loops until bool done = true;
  In the method TestMoves(), depending on user input, the method returns the bool done as either true or false.  However, I do not know how to "send" this value back to the while loop in my Start() method to stop the loop.  Here is my code:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  
  namespace ConsoleApplication1
  {
      class Program
      {
  
  
          public static void Main(string[] args)
          {
              Start("r");
          }
  
          public static string Start(string move)
          {
  
              Console.Write("Welcome to the Shotgun App\nEnter s for single player and m for multiplayer: ");
              string gameType = Console.ReadLine();
  
              if (gameType == "s")
              {
  
                  Console.Write("Single Player Controls:\n r = reload\n s = shield\n f = fire\n ***you start with ammo\n Ready to play?");
                  Console.ReadLine();
  
                  int ammo = 1;
  
                  bool done = false;
                  while (!done)
                  {
                      Console.Write("\nEnter your move: ");
                      move = Console.ReadLine();
  
  
                      switch (move)
                      {
                          case "r":
                              Console.Write("\nYou have reloaded, press enter for Genius\n");
  
                              ammo++;
                              Console.Write("Your ammo is " + ammo);
  
                              Console.ReadLine();
  
                              string geniusMove = "";
                              Genius(geniusMove, move, done);
                              Console.ReadLine();
  
  
  
  
                              break;
                          case "s":
                              Console.Write("\nYou have shielded, press enter for Genius\n");
  
                              Console.Write("Your ammo is " + ammo);
  
                              Console.ReadLine();
  
                              geniusMove = "";
                              Genius(geniusMove, move, done);
                              Console.ReadLine();
  
  
  
  
                              break;
                          case "f":
                              if (ammo != 0)
                              {
                                  Console.Write("\nYou have fired, press enter for Genius\n");
  
                                  ammo--;
                                  Console.Write("Your ammo is " + ammo);
  
                                  Console.ReadLine();
  
                                  geniusMove = "";
                                  Genius(geniusMove, move, done);
                                  Console.ReadLine();
                              }
                              else
                              {
                                  Console.Write("You don't have enough ammo, try again");
                                  done = false;
                              }
                              break;
                          default:
                              Console.Write("\nInvalid move, try again\n");
                              done = false;
                              break;
                      }
  
  
                  }
                  return move;
              }
              else
              {
                  return move;
              }
          }
  
          static string Genius(string geniusMove, string move, bool done)
          {
              int geniusAmmo = 1;
  
              geniusMove = "r";
              if (geniusMove == "f")
              {
  
                  geniusAmmo--;
                  Console.Write("Genius had decided to fire.\nGenius ammo is " + geniusAmmo + "\n");
              }
              else if (geniusMove == "r")
              {
  
                  geniusAmmo++;
                  Console.Write("Genius had decided to reload.\nGenius ammo is " + geniusAmmo + "\n");
              }
              else if (geniusMove == "s")
              {
                  Console.Write("Genius had decided to shield.\nGenius ammo is " + geniusAmmo + "\n");
              }
              TestMoves(move, geniusMove, done);
              return geniusMove;
          }
  
  
          static bool TestMoves(string move, string geniusMove, bool done)
          {
  
              if (move == "s" &amp;&amp; geniusMove == "f")
              {
                  Console.Write("No one has died yet");
                  done = false;
                  return done;
              }
              else if (move == "f" &amp;&amp; geniusMove == "f")
              {
                  Console.Write("You both died!  Good game!");
                  done = true;
                  return done;
              }
              else if (move != "s" &amp;&amp; geniusMove == "f")
              {
                  Console.Write("You died!  Good game!");
                  done = true;
                  return done;
              }
              else if (move == "f" &amp;&amp; geniusMove == "s")
              {
                  Console.Write("No one has died yet");
                  done = false;
                  return done;
              }
              else if (move == "f" &amp;&amp; geniusMove != "s")
              {
                  Console.Write("Genius died!  Good game!");
                  done = true;
                  return done;
              }
              else if (move != "f" &amp;&amp; geniusMove != "f")
              {
                  Console.Write("No one has died yet");
                  done = false;
                  return done;
              }
              else
              {
                  return done;
              }
  
          }
      }
  }
  </code></pre>