コード例 #1
0
        public bool NewGame()
        {
            Suspend(true);

            RunningSquare.ResetAllCases();

            Suspend(false);

            File.AppendAllText(@GlobalFile.Log, DateTime.Now.ToString() + "\t *** New Game ***" + Environment.NewLine);

            return(true);
        }
コード例 #2
0
        public void Suspend(bool isWaiting)
        {
            RunningSquare.Suspend(isWaiting);

            if (isWaiting)
            {
                RunningSquare.WaitSuspended();
                File.AppendAllText(@GlobalFile.Log, DateTime.Now.ToString() + "\t Hold ! " + Environment.NewLine);
            }
            else
            {
                RunningSquare.WaitRunning();
                File.AppendAllText(@GlobalFile.Log, DateTime.Now.ToString() + "\t Go !" + Environment.NewLine);
            }
        }
コード例 #3
0
        public void Start(string pathFile)
        {
            try
            {
//                File.Delete(@GlobalFile.Log);

// Replace les pièces au départ
                if (ToolBoard.isBoardConfig())
                {
                    RunningSquare.ResetAllCases();
                    File.AppendAllText(@GlobalFile.Log, DateTime.Now.ToString() + "\t *** New Game ***" + Environment.NewLine);
                }
                else
                {
                    // Cré l'échiquier
                    ToolBoard.CreateBoard(pathFile);
                    RunningSquare.InitRunning();
                }
            }
            catch (Exception)
            {
            }
        }
コード例 #4
0
 public DateTime GetFirstHit(byte noCase)
 {
     return(RunningSquare.GetFirstHit(noCase));
 }
コード例 #5
0
 public void SetFirstHit(byte noCase)
 {
     RunningSquare.SetFirstHit(noCase);
 }
コード例 #6
0
 public bool isFirstLTSecund(byte FirstCase, byte SecundCase)
 {
     return(RunningSquare.isFirstLTSecund(FirstCase, SecundCase));
 }