[Shoginextmove-commit] [shoginextmove][71]

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2016年 2月 21日 (日) 18:53:18 JST


Revision: 71
          http://sourceforge.jp/projects/shoginextmove/scm/svn/commits/71
Author:   bellyoshi
Date:     2016-02-21 18:53:18 +0900 (Sun, 21 Feb 2016)
Log Message:
-----------


Modified Paths:
--------------
    Quantum/QuantumShogi/QuantumShogi.Logic/Board.cs
    Quantum/QuantumShogi/QuantumShogi.Logic/Piece.cs

Modified: Quantum/QuantumShogi/QuantumShogi.Logic/Board.cs
===================================================================
--- Quantum/QuantumShogi/QuantumShogi.Logic/Board.cs	2016-02-21 08:46:19 UTC (rev 70)
+++ Quantum/QuantumShogi/QuantumShogi.Logic/Board.cs	2016-02-21 09:53:18 UTC (rev 71)
@@ -7,8 +7,8 @@
 {
     class Board
     {
-        const int SIZE_OF_X = 9;
-        const int SIZE_OF_Y = 9;
+        const int SIZE_OF_X = 9 + 2;
+        const int SIZE_OF_Y = 9 + 2;
         private Piece[] _cells; 
         public Piece GetCells(int x,int y)
         {

Modified: Quantum/QuantumShogi/QuantumShogi.Logic/Piece.cs
===================================================================
--- Quantum/QuantumShogi/QuantumShogi.Logic/Piece.cs	2016-02-21 08:46:19 UTC (rev 70)
+++ Quantum/QuantumShogi/QuantumShogi.Logic/Piece.cs	2016-02-21 09:53:18 UTC (rev 71)
@@ -17,8 +17,10 @@
         {
             return _isTypeOf[pieceType];
         }
+        
+        ///なりごま
+        public bool IsPromoted { get; set; } = false;
 
-        const int Promoted = 0; //なりごま
         const int Pawn =  1;// 歩
         const int Lance =  2;// 香車
         const int Knight =  3;// 桂馬
@@ -27,10 +29,22 @@
         const int Bishop = 6;//  角
         const int Rook =  7;//  飛
         const int King =  8;//  王
-        const int Black =  9;//  現在先手の駒
-        const int White =  10;//  現在後手の駒
-        //const long Wall = Black | White;//壁
 
+        //  現在先手の駒
+        public bool IsBlack { get; set; }
+        //  現在後手の駒
+        public bool IsWhite { get; set; }
+        //壁
+        public bool IsWall {
+            get {
+                return IsBlack && IsWhite;
+            }
+            set {
+               /// IsBlack = true;
+               /// IsWhite = true;
+            }
+        }
+
          public static int MaxOfType()
         {
             return King;
@@ -49,6 +63,16 @@
             _isTypeOf[Black] = false;
             _isTypeOf[White] = false;
             _isTypeOf[color] = true;
+            IsEmtpy = false;
         }
+
+        public Piece GetEmpty()
+        {
+            return Piece()
+        }
+
+
+         public bool IsEmtpy { get; set; }
+  
     }
 }




Shoginextmove-commit メーリングリストの案内
Back to archive index