X hits on this document

375 views

0 shares

0 downloads

0 comments

95 / 102

computerScore = int.Parse(streamReader.ReadLine(),

System.Globalization.NumberStyles.Integer);

isHumanTurn = bool.Parse(streamReader.ReadLine());

                   streamReader.Close();

               }

           }

           res = true;

           isolatedStorageFile.DeleteFile(fileName);

       }

       else

           res = false;

   }

   return res;

}

private bool LoadFromStateObject(out int playerScore, out int computerScore, out bool isHumanTurn)

{

   playerScore = -1;

   computerScore = -1;

   isHumanTurn = false;

   bool res = true; // Assume success

if (PhoneApplicationService.Current.State.ContainsKey("HumanScore"))

   {

playerScore = (int)PhoneApplicationService.Current.State["HumanScore"];

       PhoneApplicationService.Current.State.Remove("HumanScore");

   }

   else

       res = false;

if (PhoneApplicationService.Current.State.ContainsKey("PhoneScore"))

   {

computerScore = (int)PhoneApplicationService.Current.State["PhoneScore"];

       PhoneApplicationService.Current.State.Remove("PhoneScore");

   }

   else res = false;

Page | 95

Document info
Document views375
Page views375
Page last viewedSat Jan 21 22:35:19 UTC 2017
Pages102
Paragraphs3115
Words17333

Comments