Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

C# / C++ CLI Micro Chess (Huo Chess)

, 23 Aug 2014
An article about Huo Chess, a chess program in C++ and C# that attempts to be smaller in size than the Commodore-era Microchess
c__v0.93__all_editions_.zip
C# v0.93 (all editions)
Huo Chess 0.93 (Kakos MiniMax depth 10)
Executable
Huo Chess 0.93 cs.exe
Source
Huo Chess 0.93 cs
Properties
Huo Chess 0.93 (Simple MiniMax)
Executable
Huo Chess 0.93 cs.exe
Source
Huo Chess 0.93 cs
bin
Properties
Huo Chess 0.94 (Kakos MiniMax depth 20)
Executable
Huo Chess 0.93 cs.exe
Source
Huo Chess 0.93 cs
Properties
executable.zip
Executable
Huo Chess 0.94 cs.exe
executables.zip
Executables
Huo Chess version 0.3
Huo Chess Opening Book
HuoChessConsole.exe
Huo Chess version 0.4
Huo Chess Opening Book
HuoChessConsole.exe
Executable_microEdition.zip
Executable_microEdition
HuoChess094cs.exe
huochess093cs.zip
HuoChess093cs.exe
huo_chess_0.6_micro_edition__source_and_exe_.zip
Huo Chess 0.6 micro edition (source and exe)
Executable
HuoChessConsole.exe
Source
HuoChessConsole
HuoChessConsole
app.ico
HuoChessConsole.vcproj.HUB7381LCL.spyridon.kakos.user
HuoChessConsole.vcproj.HZQWB1J.spyridon.kakos.user
HuoChessConsole.vcproj.KAKOS-BROS-HY.Spiros.user
HuoChessConsole.vcproj.STASP.Stavros Kakos.user
huo_chess_0.6__source_and_exe_.zip
Huo Chess 0.6 (source and exe)
Executable
HuoChessConsole.exe
Source
HuoChessConsole
HuoChessConsole
app.ico
HuoChessConsole.vcproj.HUB7381LCL.spyridon.kakos.user
HuoChessConsole.vcproj.HZQWB1J.spyridon.kakos.user
HuoChessConsole.vcproj.KAKOS-BROS-HY.Spiros.user
HuoChessConsole.vcproj.STASP.Stavros Kakos.user
huo_chess_0.721__executable_.zip
Huo Chess 0.721 (executable)
HuoChessConsole.exe
huo_chess_0.721__source_.zip
Huo Chess 0.721 (source)
HuoChessConsole
app.ico
HuoChessConsole.vcproj.HUB7381LCL.spyridon.kakos.user
HuoChessConsole.vcproj.HZQWB1J.spyridon.kakos.user
HuoChessConsole.vcproj.KAKOS-BROS-HY.Spiros.user
HuoChessConsole.vcproj.STASP.Stavros Kakos.user
Huo_Chess_0.722_and_older_versions.zip
Huo Chess 0.722 and older versions
Huo Chess 0.5
Huo Chess 0.5 (Executable).zip
Huo Chess 0.5 (Source).zip
Huo Chess 0.6
Huo Chess 0.6 (Executable).zip
Huo Chess 0.6 (Source code).zip
Huo Chess Opening Book.zip
Huo Chess 0.6_micro
Huo Chess 0.6 - micro edition (Executable).zip
Huo Chess 0.6 - micro edition (Source code).zip
Huo Chess Opening Book.zip
Huo Chess 0.721
Huo Chess 0.721 (executable).zip
Huo Chess 0.721 (source).zip
Huo Chess Opening Book.zip
Huo Chess 0.722
Huo Chess 0.722 Executable.zip
Huo Chess 0.722 Source.zip
Huo_Chess_0.722__all_editions_.zip
Huo Chess 0.722 (all editions)
Huo Chess 0.722 (C++ edition)
Executable
HuoChessConsole.exe
Source
HuoChessConsole
HuoChessConsole
app.ico
HuoChessConsole.vcproj.HUB7381LCL.spyridon.kakos.user
HuoChessConsole.vcproj.HZQWB1J.spyridon.kakos.user
HuoChessConsole.vcproj.KAKOS-BROS-HY.Spiros.user
HuoChessConsole.vcproj.STASP.Stavros Kakos.user
Huo Chess 0.722 (CS edition)
Executable
Huo Chess 0.721 cs.exe
Source
Huo Chess 0.722 cs
Huo Chess 0.6 cs
bin
Properties
Huo Chess 0.722 (GUI edition)
Executable
Content
a_black_bishop.xnb
a_black_king.xnb
a_black_knight.xnb
a_black_pawn.xnb
a_black_queen.xnb
a_black_rook.xnb
a_skakiera_empty.xnb
a_skakiera_startingPosition.xnb
a_white_bishop.xnb
a_white_king.xnb
a_white_knight.xnb
a_white_pawn.xnb
a_white_queen.xnb
a_white_rook.xnb
b_black_bishop.xnb
b_black_king.xnb
b_black_knight.xnb
b_black_pawn.xnb
b_black_queen.xnb
b_black_rook.xnb
b_white_bishop.xnb
b_white_king.xnb
b_white_knight.xnb
b_white_pawn.xnb
b_white_queen.xnb
b_white_rook.xnb
chess_columns.xnb
chess_columns_v2.xnb
chess_ranks.xnb
chess_ranks_v2.xnb
chess_white.xnb
chess_white_v2.xnb
SpriteFont1.xnb
XNAHuoChessGame.exe
Source
XNAHuoChessGame
Content
a_black_bishop.PNG
a_black_king.PNG
a_black_knight.PNG
a_black_pawn.PNG
a_black_queen.PNG
a_black_rook.PNG
a_skakiera_empty.bmp
a_skakiera_startingPosition.bmp
a_white_bishop.PNG
a_white_king.PNG
a_white_knight.PNG
a_white_pawn.PNG
a_white_queen.PNG
a_white_rook.PNG
bin
x86
Debug
Release
Xbox 360
Debug
Release
Zune
Debug
Release
b_black_bishop.PNG
b_black_king.PNG
b_black_knight.PNG
b_black_pawn.PNG
b_black_queen.PNG
b_black_rook.PNG
b_white_bishop.PNG
b_white_king.PNG
b_white_knight.PNG
b_white_pawn.PNG
b_white_queen.PNG
b_white_rook.PNG
chess_columns.bmp
chess_columns_v2.bmp
chess_ranks.bmp
chess_ranks_v2.bmp
chess_white.bmp
chess_white_v2.bmp
Content.contentproj
obj
x86
Debug
TempPE
Release
TempPE
Xbox 360
Debug
Release
Zune
Debug
Release
SpriteFont1.spritefont
Thumbs.db
Game.ico
GameThumbnail.png
Properties
Xbox 360 Copy of XNAHuoChessGame.csproj.Debug.cachefile
Xbox 360 Copy of XNAHuoChessGame.csproj.Release.cachefile
XNAHuoChessGame.csproj.Debug.cachefile
XNAHuoChessGame.csproj.Release.cachefile
XNAHuoChessGame.csproj.user
Zune Copy of Xbox 360 Copy of XNAHuoChessGame.csproj.Debug.cachefile
Zune Copy of Xbox 360 Copy of XNAHuoChessGame.csproj.Release.cachefile
huo_chess_0.82_all_editions.zip
Huo Chess 0.82 all editions
Huo Chess 0.81 cpp edition
Executable
Huo Chess Opening Book
HuoChessConsole.exe
Source
HuoChessConsole
HuoChessConsole
app.ico
HuoChessConsole.vcproj.HUB7381LCL.spyridon.kakos.user
HuoChessConsole.vcproj.HZQWB1J.spyridon.kakos.user
HuoChessConsole.vcproj.KAKOS-BROS-HY.Spiros.user
HuoChessConsole.vcproj.STASP.Stavros Kakos.user
Huo Chess 0.82 cs edition
Executable
Huo Chess 0.721 cs.exe
Huo Chess Opening Book
Source
Huo Chess 0.6 cs
bin
Properties
Huo Chess 0.82 vb edition
Executable
HuoChessVB.exe
Source
HuoChessVB
My Project
Application.myapp
Settings.settings
Huo Chess 0.82 XNA edition
Executable
Content
a_black_bishop.xnb
a_black_king.xnb
a_black_knight.xnb
a_black_pawn.xnb
a_black_queen.xnb
a_black_rook.xnb
a_skakiera_empty.xnb
a_skakiera_startingPosition.xnb
a_white_bishop.xnb
a_white_king.xnb
a_white_knight.xnb
a_white_pawn.xnb
a_white_queen.xnb
a_white_rook.xnb
b_black_bishop.xnb
b_black_king.xnb
b_black_knight.xnb
b_black_pawn.xnb
b_black_queen.xnb
b_black_rook.xnb
b_white_bishop.xnb
b_white_king.xnb
b_white_knight.xnb
b_white_pawn.xnb
b_white_queen.xnb
b_white_rook.xnb
chess_columns.xnb
chess_columns_v2.xnb
chess_ranks.xnb
chess_ranks_v2.xnb
chess_white.xnb
chess_white_v2.xnb
SpriteFont1.xnb
Huo Chess Opening Book
Huo_Chess_XNA.exe
Source
XNAHuoChessGame
Content
a_black_bishop.PNG
a_black_king.PNG
a_black_knight.PNG
a_black_pawn.PNG
a_black_queen.PNG
a_black_rook.PNG
a_skakiera_empty.bmp
a_skakiera_startingPosition.bmp
a_white_bishop.PNG
a_white_king.PNG
a_white_knight.PNG
a_white_pawn.PNG
a_white_queen.PNG
a_white_rook.PNG
bin
x86
Release
Xbox 360
Release
Zune
Release
b_black_bishop.PNG
b_black_king.PNG
b_black_knight.PNG
b_black_pawn.PNG
b_black_queen.PNG
b_black_rook.PNG
b_white_bishop.PNG
b_white_king.PNG
b_white_knight.PNG
b_white_pawn.PNG
b_white_queen.PNG
b_white_rook.PNG
chess_columns.bmp
chess_columns_v2.bmp
chess_ranks.bmp
chess_ranks_v2.bmp
chess_white.bmp
chess_white_v2.bmp
Content.contentproj
SpriteFont1.spritefont
Game.ico
GameThumbnail.png
Properties
Xbox 360 Copy of XNAHuoChessGame.csproj.Debug.cachefile
Xbox 360 Copy of XNAHuoChessGame.csproj.Release.cachefile
XNAHuoChessGame.csproj.Debug.cachefile
XNAHuoChessGame.csproj.Release.cachefile
XNAHuoChessGame.csproj.user
Zune Copy of Xbox 360 Copy of XNAHuoChessGame.csproj.Debug.cachefile
Zune Copy of Xbox 360 Copy of XNAHuoChessGame.csproj.Release.cachefile
huo_chess_0.82_micro_version.zip
Huo Chess 0.82 micro version
Huo Chess 0.721 cs.exe
Huo_Chess_0.82_VS_2008-noexe.zip
Huo Chess 0.82_VS 2008
Huo Chess 0.81 cpp edition
Executable
Huo Chess Opening Book
Source
HuoChessConsole
HuoChessConsole
app.ico
HuoChessConsole.vcproj.HUB7381LCL.spyridon.kakos.user
HuoChessConsole.vcproj.HZQWB1J.spyridon.kakos.user
HuoChessConsole.vcproj.KAKOS-BROS-HY.Spiros.user
HuoChessConsole.vcproj.STASP.Stavros Kakos.user
Huo Chess 0.82 cs edition
Executable
Huo Chess Opening Book
Source
Huo Chess 0.6 cs
Properties
Huo Chess 0.82 vb edition
Source
HuoChessVB
My Project
Application.myapp
Settings.settings
Huo Chess 0.82 XNA edition
Executable
Content
a_black_bishop.xnb
a_black_king.xnb
a_black_knight.xnb
a_black_pawn.xnb
a_black_queen.xnb
a_black_rook.xnb
a_skakiera_empty.xnb
a_skakiera_startingPosition.xnb
a_white_bishop.xnb
a_white_king.xnb
a_white_knight.xnb
a_white_pawn.xnb
a_white_queen.xnb
a_white_rook.xnb
b_black_bishop.xnb
b_black_king.xnb
b_black_knight.xnb
b_black_pawn.xnb
b_black_queen.xnb
b_black_rook.xnb
b_white_bishop.xnb
b_white_king.xnb
b_white_knight.xnb
b_white_pawn.xnb
b_white_queen.xnb
b_white_rook.xnb
chess_columns.xnb
chess_columns_v2.xnb
chess_ranks.xnb
chess_ranks_v2.xnb
chess_white.xnb
chess_white_v2.xnb
SpriteFont1.xnb
Huo Chess Opening Book
Source
XNAHuoChessGame
Content
a_black_bishop.PNG
a_black_king.PNG
a_black_knight.PNG
a_black_pawn.PNG
a_black_queen.PNG
a_black_rook.PNG
a_skakiera_empty.bmp
a_skakiera_startingPosition.bmp
a_white_bishop.PNG
a_white_king.PNG
a_white_knight.PNG
a_white_pawn.PNG
a_white_queen.PNG
a_white_rook.PNG
b_black_bishop.PNG
b_black_king.PNG
b_black_knight.PNG
b_black_pawn.PNG
b_black_queen.PNG
b_black_rook.PNG
b_white_bishop.PNG
b_white_king.PNG
b_white_knight.PNG
b_white_pawn.PNG
b_white_queen.PNG
b_white_rook.PNG
chess_columns.bmp
chess_columns_v2.bmp
chess_ranks.bmp
chess_ranks_v2.bmp
chess_white.bmp
chess_white_v2.bmp
Content.contentproj
SpriteFont1.spritefont
Game.ico
GameThumbnail.png
Properties
Xbox 360 Copy of XNAHuoChessGame.csproj.Debug.cachefile
Xbox 360 Copy of XNAHuoChessGame.csproj.Release.cachefile
XNAHuoChessGame.csproj.Debug.cachefile
XNAHuoChessGame.csproj.Release.cachefile
XNAHuoChessGame.csproj.user
Zune Copy of Xbox 360 Copy of XNAHuoChessGame.csproj.Debug.cachefile
Zune Copy of Xbox 360 Copy of XNAHuoChessGame.csproj.Release.cachefile
Huo_Chess_0.82_VS_2008.zip
HuoChessConsole.exe
app.ico
HuoChessConsole.vcproj.HUB7381LCL.spyridon.kakos.user
HuoChessConsole.vcproj.HZQWB1J.spyridon.kakos.user
HuoChessConsole.vcproj.KAKOS-BROS-HY.Spiros.user
HuoChessConsole.vcproj.STASP.Stavros Kakos.user
Huo Chess 0.721 cs.exe
Executable
HuoChessVB.exe
Application.myapp
Settings.settings
a_black_bishop.xnb
a_black_king.xnb
a_black_knight.xnb
a_black_pawn.xnb
a_black_queen.xnb
a_black_rook.xnb
a_skakiera_empty.xnb
a_skakiera_startingPosition.xnb
a_white_bishop.xnb
a_white_king.xnb
a_white_knight.xnb
a_white_pawn.xnb
a_white_queen.xnb
a_white_rook.xnb
b_black_bishop.xnb
b_black_king.xnb
b_black_knight.xnb
b_black_pawn.xnb
b_black_queen.xnb
b_black_rook.xnb
b_white_bishop.xnb
b_white_king.xnb
b_white_knight.xnb
b_white_pawn.xnb
b_white_queen.xnb
b_white_rook.xnb
chess_columns.xnb
chess_columns_v2.xnb
chess_ranks.xnb
chess_ranks_v2.xnb
chess_white.xnb
chess_white_v2.xnb
SpriteFont1.xnb
Huo_Chess_XNA.exe
a_black_bishop.PNG
a_black_king.PNG
a_black_knight.PNG
a_black_pawn.PNG
a_black_queen.PNG
a_black_rook.PNG
a_skakiera_empty.bmp
a_skakiera_startingPosition.bmp
a_white_bishop.PNG
a_white_king.PNG
a_white_knight.PNG
a_white_pawn.PNG
a_white_queen.PNG
a_white_rook.PNG
b_black_bishop.PNG
b_black_king.PNG
b_black_knight.PNG
b_black_pawn.PNG
b_black_queen.PNG
b_black_rook.PNG
b_white_bishop.PNG
b_white_king.PNG
b_white_knight.PNG
b_white_pawn.PNG
b_white_queen.PNG
b_white_rook.PNG
chess_columns.bmp
chess_columns_v2.bmp
chess_ranks.bmp
chess_ranks_v2.bmp
chess_white.bmp
chess_white_v2.bmp
Content.contentproj
SpriteFont1.spritefont
Game.ico
GameThumbnail.png
Xbox 360 Copy of XNAHuoChessGame.csproj.Debug.cachefile
Xbox 360 Copy of XNAHuoChessGame.csproj.Release.cachefile
XNAHuoChessGame.csproj.Debug.cachefile
XNAHuoChessGame.csproj.Release.cachefile
XNAHuoChessGame.csproj.user
Zune Copy of Xbox 360 Copy of XNAHuoChessGame.csproj.Debug.cachefile
Zune Copy of Xbox 360 Copy of XNAHuoChessGame.csproj.Release.cachefile
Huo_Chess_0.82__all_editions_.zip
Huo Chess 0.82 (all editions)
Huo Chess 0.81 cpp edition
Executable
Huo Chess Opening Book
HuoChessConsole.exe
Source
HuoChessConsole
HuoChessConsole
app.ico
HuoChessConsole.vcproj.HUB7381LCL.spyridon.kakos.user
HuoChessConsole.vcproj.HZQWB1J.spyridon.kakos.user
HuoChessConsole.vcproj.KAKOS-BROS-HY.Spiros.user
HuoChessConsole.vcproj.STASP.Stavros Kakos.user
Huo Chess 0.82 cs edition
Executable
Huo Chess 0.721 cs.exe
Huo Chess Opening Book
Source
Huo Chess 0.6 cs
bin
Properties
Huo Chess 0.82 XNA edition
Executable
Content
a_black_bishop.xnb
a_black_king.xnb
a_black_knight.xnb
a_black_pawn.xnb
a_black_queen.xnb
a_black_rook.xnb
a_skakiera_empty.xnb
a_skakiera_startingPosition.xnb
a_white_bishop.xnb
a_white_king.xnb
a_white_knight.xnb
a_white_pawn.xnb
a_white_queen.xnb
a_white_rook.xnb
b_black_bishop.xnb
b_black_king.xnb
b_black_knight.xnb
b_black_pawn.xnb
b_black_queen.xnb
b_black_rook.xnb
b_white_bishop.xnb
b_white_king.xnb
b_white_knight.xnb
b_white_pawn.xnb
b_white_queen.xnb
b_white_rook.xnb
chess_columns.xnb
chess_columns_v2.xnb
chess_ranks.xnb
chess_ranks_v2.xnb
chess_white.xnb
chess_white_v2.xnb
SpriteFont1.xnb
Huo Chess Opening Book
Huo_Chess_XNA.exe
Source
XNAHuoChessGame
Content
a_black_bishop.PNG
a_black_king.PNG
a_black_knight.PNG
a_black_pawn.PNG
a_black_queen.PNG
a_black_rook.PNG
a_skakiera_empty.bmp
a_skakiera_startingPosition.bmp
a_white_bishop.PNG
a_white_king.PNG
a_white_knight.PNG
a_white_pawn.PNG
a_white_queen.PNG
a_white_rook.PNG
bin
x86
Debug
Release
Xbox 360
Debug
Release
Zune
Debug
Release
b_black_bishop.PNG
b_black_king.PNG
b_black_knight.PNG
b_black_pawn.PNG
b_black_queen.PNG
b_black_rook.PNG
b_white_bishop.PNG
b_white_king.PNG
b_white_knight.PNG
b_white_pawn.PNG
b_white_queen.PNG
b_white_rook.PNG
chess_columns.bmp
chess_columns_v2.bmp
chess_ranks.bmp
chess_ranks_v2.bmp
chess_white.bmp
chess_white_v2.bmp
Content.contentproj
obj
x86
Debug
Refactor
TempPE
Release
TempPE
Xbox 360
Debug
Release
Zune
Debug
ResolveAssemblyReference.cache
Release
SpriteFont1.spritefont
Game.ico
GameThumbnail.png
Properties
Xbox 360 Copy of XNAHuoChessGame.csproj.Debug.cachefile
Xbox 360 Copy of XNAHuoChessGame.csproj.Release.cachefile
XNAHuoChessGame.csproj.Debug.cachefile
XNAHuoChessGame.csproj.Release.cachefile
XNAHuoChessGame.csproj.user
Zune Copy of Xbox 360 Copy of XNAHuoChessGame.csproj.Debug.cachefile
Zune Copy of Xbox 360 Copy of XNAHuoChessGame.csproj.Release.cachefile
Huo_Chess_0.93_VS2010-noexe.zip
Huo Chess 0.93_VS2010
Huo Chess 0.93_CS (official)
Huo Chess 0.93 (Simple MiniMax)
Source
Huo Chess 0.93 cs
Properties
Huo Chess 0.94 (Kakos MiniMax depth 20)
Source
Huo Chess 0.93 cs
Properties
Huo Chess 0.93_XNA (official)
Huo Chess 0.93 XNA edition - huoMinimax 20 v2
Huo Chess XNA 0.93 Executable.zip
Huo Chess XNA 0.93 Source.zip
Huo_Chess_0.93_VS2010.zip
Executable
Huo Chess 0.93 cs.exe
Executable
Huo Chess 0.93 cs.exe
Huo Chess XNA 0.93 Executable.zip
Huo Chess XNA 0.93 Source.zip
huo_chess_0.94.zip
Huo Chess 0.94
Executable
Huo Chess 0.94 cs.exe
Executable_microEdition
HuoChess094cs.exe
Source
Huo Chess 0.94 cs
bin
Release
Huo Chess 0.94 cs.exe
huochess.ico
Properties
Huo_Chess_0.95_cs_VS2012-noexe.zip
Huo Chess 0.95 cs_VS2012
Source
Huo Chess 0.95 cs
Properties
Huo_Chess_0.95_cs_VS2012.zip
Executable
Huo Chess 0.95 cs.exe
bin
Release
Huo Chess 0.95 cs.exe
Huo_Chess_0.95_cs_with_GUI_VS2012-noexe.zip
Huo Chess 0.95 cs with GUI_VS2012
Executable
Resources
BBishop.gif
BKing.gif
BKnight.gif
BKnight1.GIF
blacksquare.gif
BPawn.gif
BQueen.gif
BRook.gif
nothing.gif
WBishop - Copy.gif
WBishop.gif
whitesquare.gif
WKing.gif
WKnight.gif
WPawn.gif
WQueen.gif
WRook.gif
Source
HuoChessW8
Properties
Settings.settings
Resources
BBishop.gif
BKing.gif
BKnight.gif
BKnight1.GIF
blacksquare.gif
BPawn.gif
BQueen.gif
BRook.gif
nothing.gif
WBishop - Copy.gif
WBishop.gif
whitesquare.gif
WKing.gif
WKnight.gif
WPawn.gif
WQueen.gif
WRook.gif
Huo_Chess_0.95_cs_with_GUI_VS2012.zip
HuoChessW8.exe
BBishop.gif
BKing.gif
BKnight.gif
BKnight1.GIF
blacksquare.gif
BPawn.gif
BQueen.gif
BRook.gif
nothing.gif
WBishop - Copy.gif
WBishop.gif
whitesquare.gif
WKing.gif
WKnight.gif
WPawn.gif
WQueen.gif
WRook.gif
Settings.settings
BBishop.gif
BKing.gif
BKnight.gif
BKnight1.GIF
blacksquare.gif
BPawn.gif
BQueen.gif
BRook.gif
nothing.gif
WBishop - Copy.gif
WBishop.gif
whitesquare.gif
WKing.gif
WKnight.gif
WPawn.gif
WQueen.gif
WRook.gif
Huo_Chess_0.95_with_GUI_VS2012-noexe.zip
Huo Chess 0.95 with GUI_VS2012
Executable
Resources
BBishop.gif
BKing.gif
BKnight.gif
BKnight1.GIF
blacksquare.gif
BPawn.gif
BQueen.gif
BRook.gif
nothing.gif
WBishop - Copy.gif
WBishop.gif
whitesquare.gif
WKing.gif
WKnight.gif
WPawn.gif
WQueen.gif
WRook.gif
Source
HuoChessW8
bin
Release
Resources
BBishop.gif
BKing.gif
BKnight.gif
BKnight1.GIF
blacksquare.gif
BPawn.gif
BQueen.gif
BRook.gif
nothing.gif
WBishop - Copy.gif
WBishop.gif
whitesquare.gif
WKing.gif
WKnight.gif
WPawn.gif
WQueen.gif
WRook.gif
Properties
Settings.settings
Resources
BBishop.gif
BKing.gif
BKnight.gif
BKnight1.GIF
blacksquare.gif
BPawn.gif
BQueen.gif
BRook.gif
nothing.gif
WBishop - Copy.gif
WBishop.gif
whitesquare.gif
WKing.gif
WKnight.gif
WPawn.gif
WQueen.gif
WRook.gif
Huo_Chess_0.95_with_GUI_VS2012.zip
HuoChessW8.exe
BBishop.gif
BKing.gif
BKnight.gif
BKnight1.GIF
blacksquare.gif
BPawn.gif
BQueen.gif
BRook.gif
nothing.gif
WBishop - Copy.gif
WBishop.gif
whitesquare.gif
WKing.gif
WKnight.gif
WPawn.gif
WQueen.gif
WRook.gif
BBishop.gif
BKing.gif
BKnight.gif
BKnight1.GIF
blacksquare.gif
BPawn.gif
BQueen.gif
BRook.gif
nothing.gif
WBishop - Copy.gif
WBishop.gif
whitesquare.gif
WKing.gif
WKnight.gif
WPawn.gif
WQueen.gif
WRook.gif
Settings.settings
BBishop.gif
BKing.gif
BKnight.gif
BKnight1.GIF
blacksquare.gif
BPawn.gif
BQueen.gif
BRook.gif
nothing.gif
WBishop - Copy.gif
WBishop.gif
whitesquare.gif
WKing.gif
WKnight.gif
WPawn.gif
WQueen.gif
WRook.gif
HUO_CHESS_0.961-noexe.zip
HUO CHESS 0.961
Huo Chess 0.961 with GUI_VS2012
Executable
Resources
BBishop.gif
BKing.gif
BKnight.gif
BKnight1.GIF
blacksquare.gif
BPawn.gif
BQueen.gif
BRook.gif
nothing.gif
WBishop - Copy.gif
WBishop.gif
whitesquare.gif
WKing.gif
WKnight.gif
WPawn.gif
WQueen.gif
WRook.gif
Source
HuoChessW8
bin
Debug
Release
HuoChessW8.pdb
HuoChessW8.vshost.exe.manifest
Resources
BBishop.gif
BKing.gif
BKnight.gif
BKnight1.GIF
blacksquare.gif
BPawn.gif
BQueen.gif
BRook.gif
nothing.gif
WBishop - Copy.gif
WBishop.gif
whitesquare.gif
WKing.gif
WKnight.gif
WPawn.gif
WQueen.gif
WRook.gif
obj
Properties
Settings.settings
Resources
BBishop.gif
BKing.gif
BKnight.gif
BKnight1.GIF
blacksquare.gif
BPawn.gif
BQueen.gif
BRook.gif
nothing.gif
WBishop - Copy.gif
WBishop.gif
whitesquare.gif
WKing.gif
WKnight.gif
WPawn.gif
WQueen.gif
WRook.gif
Huo Chess Thought process v0.7.docx
~$o Chess Thought process v0.41.docx
~$o Chess Thought process v0.5.docx
~WRL0266.tmp
HUO_CHESS_0.961.zip
HuoChessW8.exe
BBishop.gif
BKing.gif
BKnight.gif
BKnight1.GIF
blacksquare.gif
BPawn.gif
BQueen.gif
BRook.gif
nothing.gif
WBishop - Copy.gif
WBishop.gif
whitesquare.gif
WKing.gif
WKnight.gif
WPawn.gif
WQueen.gif
WRook.gif
HuoChessW8.exe
HuoChessW8.pdb
HuoChessW8.vshost.exe
HuoChessW8.vshost.exe.manifest
BBishop.gif
BKing.gif
BKnight.gif
BKnight1.GIF
blacksquare.gif
BPawn.gif
BQueen.gif
BRook.gif
nothing.gif
WBishop - Copy.gif
WBishop.gif
whitesquare.gif
WKing.gif
WKnight.gif
WPawn.gif
WQueen.gif
WRook.gif
Settings.settings
BBishop.gif
BKing.gif
BKnight.gif
BKnight1.GIF
blacksquare.gif
BPawn.gif
BQueen.gif
BRook.gif
nothing.gif
WBishop - Copy.gif
WBishop.gif
whitesquare.gif
WKing.gif
WKnight.gif
WPawn.gif
WQueen.gif
WRook.gif
Huo Chess Thought process v0.7.docx
~$o Chess Thought process v0.41.docx
~$o Chess Thought process v0.5.docx
~WRL0266.tmp
Huo_Chess_0.961_cs-noexe.zip
Huo Chess 0.961 cs
Executable
Huo Chess Thought process v0.7.docx
Source
Huo Chess 0.95 cs
bin
Release
Huo Chess 0.95 cs.pdb
Huo Chess 0.95 cs.vshost.exe.manifest
obj
Properties
~$o Chess Thought process v0.7.docx
Huo_Chess_0.961_cs.zip
Huo Chess 0.95 cs.exe
Huo Chess Thought process v0.7.docx
Huo Chess 0.95 cs.exe
Huo Chess 0.95 cs.pdb
Huo Chess 0.95 cs.vshost.exe
Huo Chess 0.95 cs.vshost.exe.manifest
~$o Chess Thought process v0.7.docx
huo_chess_new_article.zip
Huo Chess new article
Files
Executable
Huo Chess Opening Book
HuoChessConsole.exe
Source
HuoChessConsole
HuoChessConsole
app.ico
HuoChessConsole.vcproj.HUB7381LCL.spyridon.kakos.user
HuoChessConsole.vcproj.HZQWB1J.spyridon.kakos.user
HuoChessConsole.vcproj.KAKOS-BROS-HY.Spiros.user
HuoChessConsole.vcproj.STASP.Stavros Kakos.user
Thumbs.db
huo_chess_opening_book.zip
Huo Chess Opening Book
Huo_Chess_Opening_Book_Editor_0.1-noexe.zip
Huo Chess Opening Book Editor 0.1
Executable
Huo Chess Opening Book
Source
Huo Chess Opening Book Editor
app.ico
Huo Chess Opening Book
Huo Chess Opening Book Editor.vcproj.HUB7381LCL.spyridon.kakos.user
Huo Chess Opening Book Editor.vcxproj.filters
Release
Huo Chess Opening Book
Huo_Chess_Opening_Book_Editor_0.1.zip
Huo Chess Opening Book Editor.exe
app.ico
Huo Chess Opening Book Editor.vcproj.HUB7381LCL.spyridon.kakos.user
Huo Chess Opening Book Editor.vcxproj.filters
Huo Chess Opening Book Editor.exe
huo_chess_with_gui__xna__v0.93.zip
Huo Chess with GUI (XNA) v0.93
Executable
Content
a_black_bishop.xnb
a_black_king.xnb
a_black_knight.xnb
a_black_pawn.xnb
a_black_queen.xnb
a_black_rook.xnb
a_skakiera_empty.xnb
a_skakiera_startingPosition.xnb
a_white_bishop.xnb
a_white_king.xnb
a_white_knight.xnb
a_white_pawn.xnb
a_white_queen.xnb
a_white_rook.xnb
b_black_bishop.xnb
b_black_king.xnb
b_black_knight.xnb
b_black_pawn.xnb
b_black_queen.xnb
b_black_rook.xnb
b_white_bishop.xnb
b_white_king.xnb
b_white_knight.xnb
b_white_pawn.xnb
b_white_queen.xnb
b_white_rook.xnb
chess_columns.xnb
chess_columns_v2.xnb
chess_ranks.xnb
chess_ranks_v2.xnb
chess_white.xnb
chess_white_v2.xnb
SpriteFont1.xnb
Huo_Chess_XNA.exe
Huo_Chess_XNA.pdb
Source
XNAHuoChessGame
bin
x86
Debug
Release
Content
a_black_bishop.xnb
a_black_king.xnb
a_black_knight.xnb
a_black_pawn.xnb
a_black_queen.xnb
a_black_rook.xnb
a_skakiera_empty.xnb
a_skakiera_startingPosition.xnb
a_white_bishop.xnb
a_white_king.xnb
a_white_knight.xnb
a_white_pawn.xnb
a_white_queen.xnb
a_white_rook.xnb
b_black_bishop.xnb
b_black_king.xnb
b_black_knight.xnb
b_black_pawn.xnb
b_black_queen.xnb
b_black_rook.xnb
b_white_bishop.xnb
b_white_king.xnb
b_white_knight.xnb
b_white_pawn.xnb
b_white_queen.xnb
b_white_rook.xnb
chess_columns.xnb
chess_columns_v2.xnb
chess_ranks.xnb
chess_ranks_v2.xnb
chess_white.xnb
chess_white_v2.xnb
SpriteFont1.xnb
Huo_Chess_XNA.exe
Huo_Chess_XNA.pdb
ClassDiagram1.cd
Content
a_black_bishop.PNG
a_black_king.PNG
a_black_knight.PNG
a_black_pawn.PNG
a_black_queen.PNG
a_black_rook.PNG
a_skakiera_empty.bmp
a_skakiera_startingPosition.bmp
a_white_bishop.PNG
a_white_king.PNG
a_white_knight.PNG
a_white_pawn.PNG
a_white_queen.PNG
a_white_rook.PNG
b_black_bishop.PNG
b_black_king.PNG
b_black_knight.PNG
b_black_pawn.PNG
b_black_queen.PNG
b_black_rook.PNG
b_white_bishop.PNG
b_white_king.PNG
b_white_knight.PNG
b_white_pawn.PNG
b_white_queen.PNG
b_white_rook.PNG
chess_columns.bmp
chess_columns_v2.bmp
chess_ranks.bmp
chess_ranks_v2.bmp
chess_white.bmp
chess_white_v2.bmp
SpriteFont1.spritefont
XNAHuoChessGameContent.contentproj
XNAHuoChessGameContent.contentproj.user
Game.ico
GameThumbnail.png
huochess.ico
HuoChessPng.png
Properties
XNAHuoChessGame.csproj.Debug.cachefile
XNAHuoChessGame.csproj.Release.cachefile
XNAHuoChessGame.csproj.user
source.zip
Source
Huo Chess 0.94 cs
bin
Release
Huo Chess 0.94 cs.exe
huochess.ico
Properties
source_code.zip
Source code
Huo Chess version 0.3
HuoChessConsole
HuoChessConsole
app.ico
HuoChessConsole.vcproj.HZQWB1J.spyridon.kakos.user
HuoChessConsole.vcproj.STASP.Stavros Kakos.user
Huo Chess version 0.4
HuoChessConsole
HuoChessConsole
app.ico
HuoChessConsole.vcproj.HUB7381LCL.spyridon.kakos.user
HuoChessConsole.vcproj.HZQWB1J.spyridon.kakos.user
HuoChessConsole.vcproj.STASP.Stavros Kakos.user
// HuoChessConsole.cpp : main project file.

#include "stdafx.h"

using namespace System;
using namespace System::IO;
using namespace System::Threading;

ref class HuoOpeningEditor_main {
	public:
	////////////////////////////////////////////////////////////////////////////////////////////////////////
	// DECLARE VARIABLES
	////////////////////////////////////////////////////////////////////////////////////////////////////////

	// the chessboard (=skakiera in Greek)
	static array<String^, 2>^ Skakiera = gcnew array<String^, 2>(8,8);  // ������ ������ ��� �������������� �� ��������
	static array<String^, 2>^ Skakiera0 = gcnew array<String^, 2>(8,8);  // ������ ������ ��� �������������� �� ��������

	int iiii;
	int jjjj;
	String^ line_in_opening_book;
	// ��������� ��� ������������ �� �� ������� ��������� ��� �������� ����� �� ������ ��� ��� ������ ��� �������� ������������� ��� ������ ���������� ��� ��
	static bool match_found = false;
	int where_is_the_match;

	// Arrays to use in ComputerMove function
	// Changed in version 0.5
	// Penalty for moving the only piece that defends a square to that square (thus leavind the defender
	// alone in the square he once defended, defenceless!)
	// This penalty is also used to indicate that the computer loses its Queen with the move analyzed
	bool Danger_penalty;
	//bool LoseQueen_penalty;
	// Penalty for moving your piece to a square that the human opponent can hit with more power than the computer.
	bool Attackers_penalty;
	// Penalty if the pieces of the human defending a square in which the computer movies in, have much less
	// value than the pieces the computer has to support the attack on that square
	bool Defenders_value_penalty;

	String^ m_PlayerColor;   
	String^ m_ComputerLevel; 
	String^ m_WhoPlays;      
	String^ m_WhichColorPlays; 
	String^ MovingPiece;      

	// variable to store temporarily the piece that is moving
	String^ ProsorinoKommati; 
	String^ ProsorinoKommati_KingCheck; 

	// variables to check the legality of the move
	static bool exit_elegxos_nomimothtas = false;
	int h;
	int p;
	int how_to_move_Rank;
	int how_to_move_Column;
	int hhh;

	// NEW
	int kopa;
	bool KingCheck;

	// coordinates of the starting square of the move
	String^ m_StartingColumn;
	int m_StartingRank;
	String^ m_FinishingColumn;
	int m_FinishingRank;

	// variable for en passant moves
	bool enpassant_occured;

	// move number
	int Move;

	// variable to show if promotion of a pawn occured
	static bool Promotion_Occured = false;

	// variable to show if castrling occured
	static bool Castling_Occured = false;

	// variables to help find out if it is legal for the computer to perform castling
	static bool White_King_Moved = false;
	static bool Black_King_Moved = false;
	static bool White_Rook_a1_Moved = false;
	static bool White_Rook_h1_Moved = false;
	static bool Black_Rook_a8_Moved = false;
	static bool Black_Rook_h8_Moved = false;
	static bool Can_Castle_Big_White;
	static bool Can_Castle_Big_Black;
	static bool Can_Castle_Small_White;
	static bool Can_Castle_Small_Black;
	
	// variables to show where the kings are in the chessboard
	int WhiteKingColumn;      
    int WhiteKingRank;        
	int BlackKingColumn;      
    int BlackKingRank;        

	// variables to show if king is in check
	bool WhiteKingCheck;
	bool BlackKingCheck;

	// variables to show if there is a possibility for mate
	bool WhiteMate;
	bool BlackMate;
	bool Mate;

	// variable to show if a move is found for the hy to do
	bool Best_Move_Found;

	// variables to help find if a king is under check.
	// (see CheckForWhiteCheck and CheckForBlackCheck functions)
	bool DangerFromRight;
	bool DangerFromLeft;
	bool DangerFromUp;
	bool DangerFromDown;
	bool DangerFromUpRight;
	bool DangerFromDownRight;
	bool DangerFromUpLeft;
	bool DangerFromDownLeft;

	// initial coordinates of the two kings
	// (see CheckForWhiteCheck and CheckForBlackCheck functions)
	int StartingWhiteKingColumn;
	int StartingWhiteKingRank;
	int StartingBlackKingColumn;
	int StartingBlackKingRank;

	// column number inserted by the user
	int m_StartingColumnNumber;
	int m_FinishingColumnNumber;

	///////////////////////////////////////////////////////////////////////////////////////////////////
	// ���������� ��� ��� ������ ��� "���������" ��� ��� "�����������" ���� ������� ��� ������
	///////////////////////////////////////////////////////////////////////////////////////////////////

	// variable for the correctness of the move
	bool m_OrthotitaKinisis;           
	// variable for the legality of the move
	bool m_NomimotitaKinisis;         
	// has the user entered a wrong column?
	bool m_WrongColumn;                

	// variables for 'For' loops
	int i;
	int j;

	int ApophasiXristi;

	//////////////////////////////////////
	// Computer Thought
	//////////////////////////////////////
	// Chessboards used for the computer throught
	static array<String^, 2>^ Skakiera_Move_0 = gcnew array<String^, 2>(8,8);  // ������ ������ ��� �������������� �� ��������
	static array<String^, 2>^ Skakiera_Move_After = gcnew array<String^, 2>(8,8);  // ������ ������ ��� �������������� �� ��������
	static array<String^, 2>^ Skakiera_Thinking = gcnew array<String^, 2>(8,8);  // ������ ������ ��� ��������������� ��� ����� ��� ����������.
	// rest of variables used for computer thought
	double Best_Move_Score;
	double Current_Move_Score;
	int Best_Move_StartingColumnNumber;
	int Best_Move_FinishingColumnNumber;
	int Best_Move_StartingRank;
	int Best_Move_FinishingRank;
	int Move_Analyzed;
	bool Stop_Analyzing;
	int Thinking_Depth;
	int m_StartingColumnNumber_HY;
	int m_FinishingColumnNumber_HY;
	int m_StartingRank_HY;
	int m_FinishingRank_HY;
	bool First_Call;
	String^ Who_Is_Analyzed;
	String^ MovingPiece_HY;

	// for writing the computer move
	String^ HY_Starting_Column_Text;
	String^ HY_Finishing_Column_Text;

	// chessboard to store the chessboard squares where it is dangerous
	// for the HY to move a piece
	// SEE function ComputerMove!
	//static array<String^, 2>^ Skakiera_Dangerous_Squares = gcnew array<String^, 2>(8,8);  // ������ ������ ��� �������������� �� ��������

	// variables which help find the best move of the human-opponent
	// during the HY thought analysis
	static array<String^, 2>^ Skakiera_Human_Move_0 = gcnew array<String^, 2>(8,8);
	static array<String^, 2>^ Skakiera_Human_Thinking = gcnew array<String^, 2>(8,8);
	bool First_Call_Human_Thought;
	int iii_Human;
	int jjj_Human;
	String^ MovingPiece_Human;
	int m_StartingColumnNumber_Human;
	int m_FinishingColumnNumber_Human;
	int m_StartingRank_Human;
	int m_FinishingRank_Human;
	int Current_Human_Move_Score;
	double Best_Human_Move_Score;
	int Best_Move_Human_StartingColumnNumber;
	int Best_Move_Human_FinishingColumnNumber;
	int Best_Move_Human_StartingRank;
	int Best_Move_Human_FinishingRank;
	bool Best_Human_Move_Found;

	// does the HY eats the queen of his opponent with the move it analyzes?
	// Changed in version 0.5
	//bool eat_queen;

	// where the player can perform en passant
	int enpassant_possible_target_rank;
	int enpassant_possible_target_column;

	// is there a possible mate?
	bool Human_is_in_check;
	bool Possible_mate;

	// does the HY moves its King with the move it is analyzing?
	bool moving_the_king;

	int choise_of_user;

	///////////////////////////////////////////////////////////////////////////////////////////////////
	// END OF VARIABLES DECLARATION
	///////////////////////////////////////////////////////////////////////////////////////////////////

void Game() {

	Console::WriteLine( "Huo Chess Opening Editor v0.1 by Spiros I.Kakos (huo) [2008]" );
	Console::WriteLine( "\nINSTRUCTIONS: Play the moves like playing with yourself.\nWhen you are at a position where you would like to teach Huo Chess which move\nto play, just play the move you think is best for that position and record the\nposition in the opening book.\nThe chessboard and your suggested move will be both recorded in the Opening\nBook directory as [number].txt files.");
	Console::WriteLine( "\nPREREQUISITE: A folder named \'Huo Chess Opening Book\' should be already created in the same folder with Huo Chess Opening Book Editor." );

	// initial values
	m_PlayerColor = "Self";
	m_WhoPlays = "Human";
	m_WhichColorPlays = "White";
	White_King_Moved = false;
	Black_King_Moved = false;
	White_Rook_a1_Moved = false;
	White_Rook_h1_Moved = false;
	Black_Rook_a8_Moved = false;
	Black_Rook_h8_Moved = false;
	Can_Castle_Big_White = true;
	Can_Castle_Big_Black = true;
	Can_Castle_Small_White = true;
	Can_Castle_Small_Black = true;
	Move = 0;
	m_WhichColorPlays = "White";

	// fix startup position
	this->Starting_position();

	// if it is the turn of HY to play, then call the respective function
	// to implement HY thought

	bool exit_game = false;

	do
	{
		////////////////////////////
		// Human enters his move
		////////////////////////////
		Console::WriteLine("");
		Console::Write("Starting column (A to H)...");
		m_StartingColumn = Console::ReadLine()->ToUpper();

		Console::Write("Starting rank (1 to 8).....");
		m_StartingRank = Int32::Parse(Console::ReadLine());

		Console::Write("Finishing column (A to H)...");
		m_FinishingColumn = Console::ReadLine()->ToUpper();

		Console::Write("Finishing rank (1 to 8).....");
		m_FinishingRank = Int32::Parse(Console::ReadLine());

		// show the move entered

		String^ Move = String::Concat("Your move: ", m_StartingColumn, m_StartingRank.ToString(), " --> " );
		Move = String::Concat( Move, m_FinishingColumn, m_FinishingRank.ToString() );
		Console::WriteLine( Move );
		Console::WriteLine("");

		// check the move entered by the human for correctness (='Orthotita' in Greek)
		// and legality (='Nomimotita' in Greek)
		this->Enter_move();
	}while(exit_game == false);

	}

// FUNCTION TO CHECK THE LEGALITY (='Nomimotita' in Greek) OF A MOVE
// (i.e. if between the initial and the destination square lies another
// piece, then the move is not legal).
bool ElegxosNomimotitas(array<String^, 2>^ ENSkakiera)              
	{												         
	// TODO: Add your control notification handler code here

	bool Nomimotita;

	////////////////////////////////////////////////////////////////////////////////////////////////////////////
	////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// ������� ��� "�����������" ��� �������. �� �.�. � ������� ���� �������� �� ������� ���� ����� ���
	// �� �2 ��� �5, ���� ��� �4 ������� ������ ����� ���, ���� � Nomimotita ���� ���� false.
	// � ��������� "����������" �� boolean ��������� Nomimotita.
	////////////////////////////////////////////////////////////////////////////////////////////////////////////
	////////////////////////////////////////////////////////////////////////////////////////////////////////////

	Nomimotita = true;

	if( ((m_FinishingRank-1) > 7) || ((m_FinishingRank-1) < 0) || ((m_FinishingColumnNumber-1) > 7) || ((m_FinishingColumnNumber-1) < 0) )
		Nomimotita = false;

	// if a piece of the same colout is in the destination square...
	if ( (MovingPiece->CompareTo("White King") == 0) || (MovingPiece->CompareTo("White Queen") == 0) || (MovingPiece->CompareTo("White Rook") == 0) || (MovingPiece->CompareTo("White Knight") == 0) || (MovingPiece->CompareTo("White Bishop") == 0)  || (MovingPiece->CompareTo("White Pawn") == 0) )
	{
		if ( (ENSkakiera[((m_FinishingColumnNumber-1)),((m_FinishingRank-1))]->CompareTo("White King") == 0) || (ENSkakiera[((m_FinishingColumnNumber-1)),((m_FinishingRank-1))]->CompareTo("White Queen") == 0) || (ENSkakiera[((m_FinishingColumnNumber-1)),((m_FinishingRank-1))]->CompareTo("White Rook") == 0) || (ENSkakiera[((m_FinishingColumnNumber-1)),((m_FinishingRank-1))]->CompareTo("White Knight") == 0) || (ENSkakiera[((m_FinishingColumnNumber-1)),((m_FinishingRank-1))]->CompareTo("White Bishop") == 0)  || (ENSkakiera[((m_FinishingColumnNumber-1)),((m_FinishingRank-1))]->CompareTo("White Pawn") == 0) )
		{
			Nomimotita = false;
		}
	}
	else if ( (MovingPiece->CompareTo("Black King") == 0) || (MovingPiece->CompareTo("Black Queen") == 0) || (MovingPiece->CompareTo("Black Rook") == 0) || (MovingPiece->CompareTo("Black Knight") == 0) || (MovingPiece->CompareTo("Black Bishop") == 0)  || (MovingPiece->CompareTo("Black Pawn") == 0) )
	{
		if ( (ENSkakiera[((m_FinishingColumnNumber-1)),((m_FinishingRank-1))]->CompareTo("Black King") == 0) || (ENSkakiera[((m_FinishingColumnNumber-1)),((m_FinishingRank-1))]->CompareTo("Black Queen") == 0) || (ENSkakiera[((m_FinishingColumnNumber-1)),((m_FinishingRank-1))]->CompareTo("Black Rook") == 0) || (ENSkakiera[((m_FinishingColumnNumber-1)),((m_FinishingRank-1))]->CompareTo("Black Knight") == 0) || (ENSkakiera[((m_FinishingColumnNumber-1)),((m_FinishingRank-1))]->CompareTo("Black Bishop") == 0)  || (ENSkakiera[((m_FinishingColumnNumber-1)),((m_FinishingRank-1))]->CompareTo("Black Pawn") == 0) )
			Nomimotita = false;
	}

	if (MovingPiece->CompareTo("White King") == 0)
	{
		/////////////////////////
		// white king
		/////////////////////////
		// is the king threatened in the destination square?
		// temporarily move king
		ENSkakiera[(m_StartingColumnNumber - 1), (m_StartingRank - 1)] = "";
		ProsorinoKommati_KingCheck = ENSkakiera[(m_FinishingColumnNumber - 1), (m_FinishingRank - 1)];
		ENSkakiera[(m_FinishingColumnNumber - 1), (m_FinishingRank - 1)] = "White King";

		//WhiteKingCheck = CheckForWhiteCheck(ENSkakiera);

		//if (WhiteKingCheck == true)
		//		Nomimotita = false;

		// restore pieces
		ENSkakiera[(m_StartingColumnNumber - 1), (m_StartingRank - 1)] = "White King";
		ENSkakiera[(m_FinishingColumnNumber - 1), (m_FinishingRank - 1)] = ProsorinoKommati_KingCheck;

	}
	else if (MovingPiece->CompareTo("Black King") == 0)
	{
		///////////////////////////
		// black king
		///////////////////////////
		// is the black king threatened in the destination square?
		// temporarily move king
		ENSkakiera[(m_StartingColumnNumber - 1), (m_StartingRank - 1)] = "";
		ProsorinoKommati_KingCheck = ENSkakiera[(m_FinishingColumnNumber - 1), (m_FinishingRank - 1)];
		ENSkakiera[(m_FinishingColumnNumber - 1), (m_FinishingRank - 1)] = "Black King";

		//BlackKingCheck = CheckForBlackCheck(ENSkakiera);

		//if (BlackKingCheck == true)
		//		Nomimotita = false;

		// restore pieces
		ENSkakiera[(m_StartingColumnNumber - 1), (m_StartingRank - 1)] = "Black King";
		ENSkakiera[(m_FinishingColumnNumber - 1), (m_FinishingRank - 1)] = ProsorinoKommati_KingCheck;

	}
	else if (MovingPiece->CompareTo("White Pawn") == 0)
	{
		/////////////////////
		// white pawn
		/////////////////////

		// move forward

		if ( (m_FinishingRank == (m_StartingRank + 1)) && (m_FinishingColumnNumber == m_StartingColumnNumber) )
		{
			if (ENSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("") == 1)
					Nomimotita = false;
		}

		// move forward for 2 squares
		else if ((m_FinishingRank == (m_StartingRank + 2)) && (m_FinishingColumnNumber == m_StartingColumnNumber))
		{
			if (m_StartingRank == 2)
			{
				if ((ENSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("") == 1)|| (ENSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1 - 1)]->CompareTo("") == 1))
						Nomimotita = false;
			}
		}

		// eat forward to the right

		else if ((m_FinishingRank == (m_StartingRank + 1)) && (m_FinishingColumnNumber == m_StartingColumnNumber + 1))
		{
			if( enpassant_occured == false )
			{
				if (ENSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("") == 0)
						Nomimotita = false;
			}
			else
			{
				if((m_FinishingRank != enpassant_possible_target_rank) || (m_FinishingColumnNumber != enpassant_possible_target_column))
					Nomimotita = false;
			}
		}

		// eat forward to the left

		else if ((m_FinishingRank == (m_StartingRank + 1)) && (m_FinishingColumnNumber == m_StartingColumnNumber - 1))
		{
			if( enpassant_occured == false )
			{
				if (ENSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("") == 0)
						Nomimotita = false;
			}
			else
			{
				if((m_FinishingRank != enpassant_possible_target_rank) || (m_FinishingColumnNumber != enpassant_possible_target_column))
					Nomimotita = false;
			}
		}

	}
	else if (MovingPiece->CompareTo("Black Pawn") == 0)
	{
		/////////////////////
		// black pawn
		/////////////////////

		// move forward

		if ( (m_FinishingRank == (m_StartingRank - 1)) && (m_FinishingColumnNumber == m_StartingColumnNumber) )
		{
			if (ENSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("") == 1)
					Nomimotita = false;
		}

		// move forward for 2 squares
		else if ((m_FinishingRank == (m_StartingRank - 2)) && (m_FinishingColumnNumber == m_StartingColumnNumber))
		{
			if (m_StartingRank == 7)
			{
				if ((ENSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("") == 1)|| (ENSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank + 1 - 1)]->CompareTo("") == 1))
						Nomimotita = false;
			}
		}

		// eat forward to the right

		else if ((m_FinishingRank == (m_StartingRank - 1)) && (m_FinishingColumnNumber == m_StartingColumnNumber + 1))
		{
			if( enpassant_occured == false )
			{
			if (ENSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("") == 0)
					Nomimotita = false;
			}
			else
			{
				if((m_FinishingRank != enpassant_possible_target_rank) || (m_FinishingColumnNumber != enpassant_possible_target_column))
					Nomimotita = false;
			}
		}

		// eat forward to the left

		else if ((m_FinishingRank == (m_StartingRank - 1)) && (m_FinishingColumnNumber == m_StartingColumnNumber - 1))
		{
			if( enpassant_occured == false )
			{
			if (ENSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("") == 0)
					Nomimotita = false;
			}
			else
			{
				if((m_FinishingRank != enpassant_possible_target_rank) || (m_FinishingColumnNumber != enpassant_possible_target_column))
					Nomimotita = false;
			}
		}

	}
	else if( (MovingPiece->CompareTo("White Rook") == 0) || (MovingPiece->CompareTo("White Queen") == 0) || (MovingPiece->CompareTo("White Bishop") == 0) || (MovingPiece->CompareTo("Black Rook") == 0) || (MovingPiece->CompareTo("Black Queen") == 0) || (MovingPiece->CompareTo("Black Bishop") == 0) )
	{
		h = 0;
		p = 0;
		hhh = 0;
		how_to_move_Rank = 0;
		how_to_move_Column = 0;

		if(((m_FinishingRank-1) > (m_StartingRank-1)) || ((m_FinishingRank-1) < (m_StartingRank-1)))
			how_to_move_Rank = ((m_FinishingRank-1) - (m_StartingRank-1))/System::Math::Abs((m_FinishingRank-1) - (m_StartingRank-1));
			
		if(((m_FinishingColumnNumber-1) > (m_StartingColumnNumber-1)) || ((m_FinishingColumnNumber-1) < (m_StartingColumnNumber-1)) )
			how_to_move_Column = ((m_FinishingColumnNumber-1) - (m_StartingColumnNumber-1))/System::Math::Abs((m_FinishingColumnNumber-1) - (m_StartingColumnNumber-1));

		exit_elegxos_nomimothtas = false;

		do
		{
			h = h + how_to_move_Rank;
			p = p + how_to_move_Column;

			if( (((m_StartingRank-1) + h) == (m_FinishingRank-1)) && ((((m_StartingColumnNumber-1) + p)) == (m_FinishingColumnNumber-1)) )
				exit_elegxos_nomimothtas = true;

			// if a piece exists between the initial and the destination square,
			// then the move is illegal!
			if( exit_elegxos_nomimothtas == false )
			{
				if ( (ENSkakiera[((m_StartingColumnNumber-1) + p),((m_StartingRank-1) + h)]->CompareTo("White King") == 0) || (ENSkakiera[((m_StartingColumnNumber-1) + p),((m_StartingRank-1) + h)]->CompareTo("White Queen") == 0) || (ENSkakiera[((m_StartingColumnNumber-1) + p),((m_StartingRank-1) + h)]->CompareTo("White Rook") == 0) || (ENSkakiera[((m_StartingColumnNumber-1) + p),((m_StartingRank-1) + h)]->CompareTo("White Knight") == 0) || (ENSkakiera[((m_StartingColumnNumber-1) + p),((m_StartingRank-1) + h)]->CompareTo("White Bishop") == 0)  || (ENSkakiera[((m_StartingColumnNumber-1) + p),((m_StartingRank-1) + h)]->CompareTo("White Pawn") == 0) || (ENSkakiera[((m_StartingColumnNumber-1) + p),((m_StartingRank-1) + h)]->CompareTo("Black King") == 0) || (ENSkakiera[((m_StartingColumnNumber-1) + p),((m_StartingRank-1) + h)]->CompareTo("Black Queen") == 0) || (ENSkakiera[((m_StartingColumnNumber-1) + p),((m_StartingRank-1) + h)]->CompareTo("Black Rook") == 0) || (ENSkakiera[((m_StartingColumnNumber-1) + p),((m_StartingRank-1) + h)]->CompareTo("Black Knight") == 0) || (ENSkakiera[((m_StartingColumnNumber-1) + p),((m_StartingRank-1) + h)]->CompareTo("Black Bishop") == 0)  || (ENSkakiera[((m_StartingColumnNumber-1) + p),((m_StartingRank-1) + h)]->CompareTo("Black Pawn") == 0) )
				{
					Nomimotita = false;
					exit_elegxos_nomimothtas = true;
				}
			}
		}while(exit_elegxos_nomimothtas == false);
	}
	return Nomimotita;
	}


// FUNCTION TO CHECK THE CORRECTNESS (='Orthotita' in Greek) OF THE MOVE
// (i.e. a Bishop can only move in diagonals, rooks in lines and columns etc)
bool ElegxosOrthotitas(array<String^, 2>^ EOSkakiera)        
	{      
	// TODO: Add your control notification handler code here

	bool Orthotita;
	Orthotita = false;
	enpassant_occured = false;

	if ( (m_WhoPlays->CompareTo("Human") == 0) && (m_WrongColumn == false) && (MovingPiece->CompareTo("") == 1) )    // �� � ������� ���� ������ ��� ������ ����� ��� ����
	{                                                         // �������� �� ������� ��� ������� (��� ��� ���� ���-
		                                                      // ����� �� ������� ��� "����" ���������) ��� ����� � ����� ��� �� ������, ���� �� ��-
		                                                      // ��� ������� ��� ��������� ��� �������. 

	// ROOK

	if ( (MovingPiece->CompareTo("White Rook") == 0)||(MovingPiece->CompareTo("Black Rook") == 0) )
	{
		if ( (m_FinishingColumnNumber != m_StartingColumnNumber)&&(m_FinishingRank == m_StartingRank) )       // ������ �� �����
			Orthotita = true;
		else if ( (m_FinishingRank != m_StartingRank)&&(m_FinishingColumnNumber == m_StartingColumnNumber) )  // ������ �� ������
			Orthotita = true;
	}

	// horse (with knight...)

	if ( (MovingPiece->CompareTo("White Knight") == 0)||(MovingPiece->CompareTo("Black Knight") == 0) )
	{
		if ( (m_FinishingColumnNumber == (m_StartingColumnNumber + 1)) && (m_FinishingRank == (m_StartingRank + 2)) )
			Orthotita = true;
		else if ( (m_FinishingColumnNumber == (m_StartingColumnNumber + 2)) && (m_FinishingRank == (m_StartingRank - 1)) )
			Orthotita = true;
		else if ( (m_FinishingColumnNumber == (m_StartingColumnNumber + 1)) && (m_FinishingRank == (m_StartingRank - 2)) )
			Orthotita = true;
		else if ( (m_FinishingColumnNumber == (m_StartingColumnNumber - 1)) && (m_FinishingRank == (m_StartingRank - 2)) )
			Orthotita = true;
		else if ( (m_FinishingColumnNumber == (m_StartingColumnNumber - 2)) && (m_FinishingRank == (m_StartingRank - 1)) )
			Orthotita = true;
		else if ( (m_FinishingColumnNumber == (m_StartingColumnNumber - 2)) && (m_FinishingRank == (m_StartingRank + 1)) )
			Orthotita = true;
		else if ( (m_FinishingColumnNumber == (m_StartingColumnNumber - 1)) && (m_FinishingRank == (m_StartingRank + 2)) )
			Orthotita = true;
		else if ( (m_FinishingColumnNumber == (m_StartingColumnNumber + 2)) && (m_FinishingRank == (m_StartingRank + 1)) )
			Orthotita = true;
	}

	// bishop

	if ( (MovingPiece->CompareTo("White Bishop") == 0)||(MovingPiece->CompareTo("Black Bishop") == 0) )
	{
		if((Math::Abs(m_FinishingColumnNumber-m_StartingColumnNumber))==(Math::Abs(m_FinishingRank-m_StartingRank)))
			Orthotita = true;
	}

	// queen

	if ( (MovingPiece->CompareTo("White Queen") == 0)||(MovingPiece->CompareTo("Black Queen") == 0) )
	{
		if ( (m_FinishingColumnNumber != m_StartingColumnNumber)&&(m_FinishingRank == m_StartingRank) )       // ������ �� �����
			Orthotita = true;
		else if ( (m_FinishingRank != m_StartingRank)&&(m_FinishingColumnNumber == m_StartingColumnNumber) )  // ������ �� ������
			Orthotita = true;

		// move in diagonals
		if((Math::Abs(m_FinishingColumnNumber-m_StartingColumnNumber))==(Math::Abs(m_FinishingRank-m_StartingRank)))
			Orthotita = true;
	}

	// king

	if ( (MovingPiece->CompareTo("White King") == 0)||(MovingPiece->CompareTo("Black King") == 0) )
	{
		// move in rows and columns

		if ( (m_FinishingColumnNumber == (m_StartingColumnNumber + 1)) && (m_FinishingRank == m_StartingRank) )
			Orthotita = true;
		else if ( (m_FinishingColumnNumber == (m_StartingColumnNumber - 1)) && (m_FinishingRank == m_StartingRank) )
			Orthotita = true;
		else if ( (m_FinishingRank == (m_StartingRank + 1)) && (m_FinishingColumnNumber == m_StartingColumnNumber) )
			Orthotita = true;
		else if ( (m_FinishingRank == (m_StartingRank - 1)) && (m_FinishingColumnNumber == m_StartingColumnNumber) )
			Orthotita = true;

		// move in diagonals

		else if ( (m_FinishingColumnNumber == (m_StartingColumnNumber + 1)) && (m_FinishingRank == (m_StartingRank + 1)) )
			Orthotita = true;
		else if ( (m_FinishingColumnNumber == (m_StartingColumnNumber + 1)) && (m_FinishingRank == (m_StartingRank - 1)) )
			Orthotita = true;
		else if ( (m_FinishingColumnNumber == (m_StartingColumnNumber - 1)) && (m_FinishingRank == (m_StartingRank - 1)) )
			Orthotita = true;
		else if ( (m_FinishingColumnNumber == (m_StartingColumnNumber - 1)) && (m_FinishingRank == (m_StartingRank + 1)) )
			Orthotita = true;

	}

	// white pawn

	if (MovingPiece->CompareTo("White Pawn") == 0)
	{
		// move forward

		if ( (m_FinishingRank == (m_StartingRank + 1)) && (m_FinishingColumnNumber == m_StartingColumnNumber) )
			Orthotita = true;

		// move forward for 2 squares
		else if ( (m_FinishingRank == (m_StartingRank + 2)) && (m_FinishingColumnNumber == m_StartingColumnNumber) && (m_StartingRank == 2) )
			Orthotita = true;

		// eat forward to the left
		else if ( (m_FinishingRank == (m_StartingRank + 1)) && (m_FinishingColumnNumber == (m_StartingColumnNumber - 1)) && ((EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("Black Pawn") == 0) || (EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("Black Rook") == 0) || (EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("Black Knight") == 0) || (EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("Black Bishop") == 0) || (EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("Black Queen") == 0) ))
			Orthotita = true;

		// eat forward to the right
		else if ( (m_FinishingRank == (m_StartingRank + 1)) && (m_FinishingColumnNumber == (m_StartingColumnNumber + 1)) && ((EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("Black Pawn") == 0) || (EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("Black Rook") == 0) || (EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("Black Knight") == 0) || (EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("Black Bishop") == 0) || (EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("Black Queen") == 0) ))
			Orthotita = true;

		// En Passant eat forward to the left
		else if ( (m_FinishingRank == (m_StartingRank + 1)) && (m_FinishingColumnNumber == (m_StartingColumnNumber - 1)) )
		{
			if((m_FinishingRank == 4) && (EOSkakiera[(m_FinishingColumnNumber - 1),(4)]->CompareTo("Black Pawn") == 0))
			{
			Orthotita = true;
			enpassant_occured = true;
			EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1 - 1)] = "";
			}
			else
			{
			Orthotita = false;
			enpassant_occured = false;
			}
		}

		// En Passant eat forward to the right
		else if ( (m_FinishingRank == (m_StartingRank + 1)) && (m_FinishingColumnNumber == (m_StartingColumnNumber + 1)) )
		{
			if((m_FinishingRank == 4) && (EOSkakiera[(m_FinishingColumnNumber - 1),(4)]->CompareTo("Black Pawn") == 0))
			{
			Orthotita = true;
			enpassant_occured = true;
			EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1 - 1)] = "";
			}
			else
			{
			Orthotita = false;
			enpassant_occured = false;
			}
		}

	}


	// black pawn

	if (MovingPiece->CompareTo("Black Pawn") == 0)
	{
		// move forward

		if ( (m_FinishingRank == (m_StartingRank - 1)) && (m_FinishingColumnNumber == m_StartingColumnNumber) )
			Orthotita = true;

		// move forward for 2 squares
		else if ( (m_FinishingRank == (m_StartingRank - 2)) && (m_FinishingColumnNumber == m_StartingColumnNumber) && (m_StartingRank == 7) )
			Orthotita = true;

		// eat forward to the left
		else if ( (m_FinishingRank == (m_StartingRank - 1)) && (m_FinishingColumnNumber == (m_StartingColumnNumber + 1)) && ((EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("White Pawn") == 0) || (EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("White Rook") == 0) || (EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("White Knight") == 0) || (EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("White Bishop") == 0) || (EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("White Queen") == 0) ))
			Orthotita = true;

		// eat forward to the right
		else if ( (m_FinishingRank == (m_StartingRank - 1)) && (m_FinishingColumnNumber == (m_StartingColumnNumber - 1)) && ((EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("White Pawn") == 0) || (EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("White Rook") == 0) || (EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("White Knight") == 0) || (EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("White Bishop") == 0) || (EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)]->CompareTo("White Queen") == 0) ))
			Orthotita = true;

		// En Passant eat forward to the left
		else if ( (m_FinishingRank == (m_StartingRank - 1)) && (m_FinishingColumnNumber == (m_StartingColumnNumber + 1)) )
		{
			if((m_FinishingRank == 3)&&(EOSkakiera[(m_FinishingColumnNumber - 1),(3)]->CompareTo("White Pawn") == 0))
			{
			Orthotita = true;
			enpassant_occured = true;
			EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank + 1 - 1)] = "";
			}
			else
			{
			Orthotita = false;
			enpassant_occured = false;
			}
		}

		// En Passant eat forward to the right
		else if ( (m_FinishingRank == (m_StartingRank - 1)) && (m_FinishingColumnNumber == (m_StartingColumnNumber - 1)) )
		{
			if((m_FinishingRank == 3)&&(EOSkakiera[(m_FinishingColumnNumber - 1),(3)]->CompareTo("White Pawn") == 0))
			{
			Orthotita = true;
			enpassant_occured = true;
			EOSkakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank + 1 - 1)] = "";
			}
			else
			{
			Orthotita = false;
			enpassant_occured = false;
			}
		}

	}

	}

	return Orthotita;
	}


		
void Enter_move(void)                       
	{                   
	// TODO: Add your control notification handler code here

	///////////////////////////////////////////////////////////////////////////////////////////////////////////////
	///////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// show the move entered by the human player
	///////////////////////////////////////////////////////////////////////////////////////////////////////////////
	///////////////////////////////////////////////////////////////////////////////////////////////////////////////

	if (m_StartingColumn->CompareTo("A") == 0)
		m_StartingColumnNumber = 1;
	else if (m_StartingColumn->CompareTo("B") == 0)
		m_StartingColumnNumber = 2;
	else if (m_StartingColumn->CompareTo("C") == 0)
		m_StartingColumnNumber = 3;
	else if (m_StartingColumn->CompareTo("D") == 0)
		m_StartingColumnNumber = 4;
	else if (m_StartingColumn->CompareTo("E") == 0)
		m_StartingColumnNumber = 5;
	else if (m_StartingColumn->CompareTo("F") == 0)
		m_StartingColumnNumber = 6;
	else if (m_StartingColumn->CompareTo("G") == 0)
		m_StartingColumnNumber = 7;
	else if (m_StartingColumn->CompareTo("H") == 0)
		m_StartingColumnNumber = 8;


	if (m_FinishingColumn->CompareTo("A") == 0)
		m_FinishingColumnNumber = 1;
	else if (m_FinishingColumn->CompareTo("B") == 0)
		m_FinishingColumnNumber = 2;
	else if (m_FinishingColumn->CompareTo("C") == 0)
		m_FinishingColumnNumber = 3;
	else if (m_FinishingColumn->CompareTo("D") == 0)
		m_FinishingColumnNumber = 4;
	else if (m_FinishingColumn->CompareTo("E") == 0)
		m_FinishingColumnNumber = 5;
	else if (m_FinishingColumn->CompareTo("F") == 0)
		m_FinishingColumnNumber = 6;
	else if (m_FinishingColumn->CompareTo("G") == 0)
		m_FinishingColumnNumber = 7;
	else if (m_FinishingColumn->CompareTo("H") == 0)
		m_FinishingColumnNumber = 8;

	// RECORD INITIAL BOARD FOR USE IN THE OPENING BOOK RECORDING PART
	for (int aop_iii = 0; aop_iii <= 7; aop_iii++)
	{
		for (int aop_jjj = 0; aop_jjj <= 7; aop_jjj++)
		{
			Skakiera0[aop_iii,aop_jjj] = Skakiera[aop_iii,aop_jjj];
		}
	}

	/////////////////////////////////////////////////////////////////////////////////////////////////
	/////////////////////////////////////////////////////////////////////////////////////////////////
	// record which piece is moving
	/////////////////////////////////////////////////////////////////////////////////////////////////
	/////////////////////////////////////////////////////////////////////////////////////////////////

	if ( ((m_WhoPlays->CompareTo("Human") == 0)||(m_PlayerColor->CompareTo("Self") == 0)) && ( ((m_WhichColorPlays->CompareTo("White") == 0) && ((Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)]->CompareTo("White Pawn") == 0)||(Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)]->CompareTo("White Rook") == 0)||(Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)]->CompareTo("White Knight") == 0)||(Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)]->CompareTo("White Bishop") == 0)||(Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)]->CompareTo("White Queen") == 0)||(Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)]->CompareTo("White King") == 0))) || ((m_WhichColorPlays->CompareTo("Black") == 0) && ((Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)]->CompareTo("Black Pawn") == 0)||(Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)]->CompareTo("Black Rook") == 0)||(Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)]->CompareTo("Black Knight") == 0)||(Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)]->CompareTo("Black Bishop") == 0)||(Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)]->CompareTo("Black Queen") == 0)||(Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)]->CompareTo("Black King") == 0))) ) )
	{

	m_WrongColumn = false;
	MovingPiece = "";

	// is the king under check?
	//if (m_PlayerColor->CompareTo("White") == 0)
	//	WhiteKingCheck = CheckForWhiteCheck(Skakiera);
	//else if (m_PlayerColor->CompareTo("Black") == 0)
	//	BlackKingCheck = CheckForBlackCheck(Skakiera);

	MovingPiece = Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)];
		
	// if he chooses to move a piece of different colour...
	if ( ((m_PlayerColor->CompareTo("White") == 0)||(m_PlayerColor->CompareTo("Self") == 0) && ((Skakiera[(m_StartingColumnNumber - 1),((m_StartingRank - 1))]->CompareTo("White Rook") == 0) || (Skakiera[(m_StartingColumnNumber - 1),((m_StartingRank - 1))]->CompareTo("White Knight") == 0) || (Skakiera[(m_StartingColumnNumber - 1),((m_StartingRank - 1))]->CompareTo("White Bishop") == 0) || (Skakiera[(m_StartingColumnNumber - 1),((m_StartingRank - 1))]->CompareTo("White Queen") == 0) || (Skakiera[(m_StartingColumnNumber - 1),((m_StartingRank - 1))]->CompareTo("White King") == 0) || (Skakiera[(m_StartingColumnNumber - 1),((m_StartingRank - 1))]->CompareTo("White Pawn") == 0)))  ||  ( ((m_PlayerColor->CompareTo("Black") == 0)||(m_PlayerColor->CompareTo("Self") == 0)) && ((Skakiera[(m_StartingColumnNumber - 1),((m_StartingRank - 1))]->CompareTo("Black Rook") == 0) || (Skakiera[(m_StartingColumnNumber - 1),((m_StartingRank - 1))]->CompareTo("Black Knight") == 0) || (Skakiera[(m_StartingColumnNumber - 1),((m_StartingRank - 1))]->CompareTo("Black Bishop") == 0) || (Skakiera[(m_StartingColumnNumber - 1),((m_StartingRank - 1))]->CompareTo("Black Queen") == 0) || (Skakiera[(m_StartingColumnNumber - 1),((m_StartingRank - 1))]->CompareTo("Black King") == 0) || (Skakiera[(m_StartingColumnNumber - 1),((m_StartingRank - 1))]->CompareTo("Black Pawn") == 0))))
	{
		Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)] = "";
	}

	}
	else
	{
		if (m_WhichColorPlays->CompareTo("White") == 0)
			Console::WriteLine("White plays.");
		else if (m_WhichColorPlays->CompareTo("Black") == 0)
			Console::WriteLine("Black plays.");

		m_WrongColumn = true;          // � ��������� ���� ������� true ��� �� ���� "�� ����" � ������ ���
		                               // �� ��������� ��� ��������� ������� ��� ���� ��� ������� ��� "��������"
		                               // ��� �������.
	}

	// Check correctness of move entered
	m_OrthotitaKinisis = ElegxosOrthotitas(Skakiera);

	// check legality of move entered
	// (only if it is correct - so as to save time!)
	if( m_OrthotitaKinisis == true )
		m_NomimotitaKinisis = ElegxosNomimotitas(Skakiera);
	else
		m_NomimotitaKinisis = false;

	// restore all pieces to the initial state
	Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)] = MovingPiece;
	Skakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)] = ProsorinoKommati;

	///////////////////////////////////////////////////////////////////
	// CHECK IF THE HUMAN HAS ENTERED A CASTLING MOVE
	///////////////////////////////////////////////////////////////////

	///////////////////////////
	// WHITE CASTLING
	///////////////////////////

	// small castling

	if ((this->m_PlayerColor->CompareTo("White") == 0) && (m_StartingColumnNumber == 5) && (m_FinishingColumnNumber == 7) && (m_StartingRank == 1) && (m_FinishingRank == 1))
	{
		if ( (Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)]->CompareTo("White King") == 0) && (Skakiera[(7),(0)]->CompareTo("White Rook") == 0) && (Skakiera[(5),(0)]->CompareTo("") == 0) && (Skakiera[(6),(0)]->CompareTo("") == 0) )
		{
			m_OrthotitaKinisis = true;
			m_NomimotitaKinisis = true;
			Castling_Occured = true;
		}
	}

	// big castling

	if ((this->m_PlayerColor->CompareTo("White") == 0) && (m_StartingColumnNumber == 5) && (m_FinishingColumnNumber == 3) && (m_StartingRank == 1) && (m_FinishingRank == 1))
	{
		if ( (Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)]->CompareTo("White King") == 0) && (Skakiera[(0),(0)]->CompareTo("White Rook") == 0) && (Skakiera[(1),(0)]->CompareTo("") == 0) && (Skakiera[(2),(0)]->CompareTo("") == 0) && (Skakiera[(3),(0)]->CompareTo("") == 0) )
		{
			m_OrthotitaKinisis = true;
			m_NomimotitaKinisis = true;
			Castling_Occured = true;
		}
	}


	///////////////////////////
	// black castling
	///////////////////////////

	// small castling

	if ((this->m_PlayerColor->CompareTo("Black") == 0) && (m_StartingColumnNumber == 5) && (m_FinishingColumnNumber == 7) && (m_StartingRank == 8) && (m_FinishingRank == 8))
	{
		if ( (Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)]->CompareTo("Black King") == 0) && (Skakiera[(7),(7)]->CompareTo("Black Rook") == 0) && (Skakiera[(5),(7)]->CompareTo("") == 0) && (Skakiera[(6),(7)]->CompareTo("") == 0) )
		{
			m_OrthotitaKinisis = true;
			m_NomimotitaKinisis = true;
			Castling_Occured = true;
		}
	}

	// big castling

	if ((this->m_PlayerColor->CompareTo("Black") == 0) && (m_StartingColumnNumber == 5) && (m_FinishingColumnNumber == 3) && (m_StartingRank == 8) && (m_FinishingRank == 8))
	{
		if ( (Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)]->CompareTo("Black King") == 0) && (Skakiera[(0),(7)]->CompareTo("Black Rook") == 0) && (Skakiera[(1),(7)]->CompareTo("") == 0) && (Skakiera[(2),(7)]->CompareTo("") == 0) && (Skakiera[(3),(7)]->CompareTo("") == 0) )
		{
			m_OrthotitaKinisis = true;
			m_NomimotitaKinisis = true;
			Castling_Occured = true;
		}
	}

	// redraw the chessboard
	if ( (m_OrthotitaKinisis == true) && (m_NomimotitaKinisis == true) )
	{

	// game moves on by 1 move (this happens only when the player plays,
	// so as to avoid increasing the game moves every half-move!)
	if(this->m_PlayerColor->CompareTo("White") == 0)
		Move = Move + 1;

	// erase initial square
	Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)] = "";

	// go to destination square
	Skakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1)] = MovingPiece;


	//////////////////////////////////////////////////////////
	// check for en passant
	//////////////////////////////////////////////////////////
	if( enpassant_occured == true )
	{
		if( this->m_PlayerColor->CompareTo("White") == 0 )
			Skakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1 - 1)] = "";
		else if( this->m_PlayerColor->CompareTo("Black") == 0 )
			Skakiera[(m_FinishingColumnNumber - 1),(m_FinishingRank - 1 + 1)] = "";
	}


	////////////////////////////////////////////////////////////////////
	// record possible sqaure when the next one playing will
	// be able to perform en passant
	////////////////////////////////////////////////////////////////////
	if( (this->m_StartingRank == 2) && (this->m_FinishingRank == 4) )
	{
		enpassant_possible_target_rank = m_FinishingRank - 1;
		enpassant_possible_target_column = m_FinishingColumnNumber;
	}
	else if( (this->m_StartingRank == 7) && (this->m_FinishingRank == 5) )
	{
		enpassant_possible_target_rank = m_FinishingRank + 1;
		enpassant_possible_target_column = m_FinishingColumnNumber;
	}
	else
	{
		// invalid value for enpassant move (= enpassant not possible in the next move)
		enpassant_possible_target_rank = -9;
		enpassant_possible_target_column = -9;
	}

	// check if castling occured (so as to move the rook next to the
	// moving king)
	if (Castling_Occured == true)
	{
		
		if (m_PlayerColor->CompareTo("White") == 0)
		{
			if (Skakiera[(6),(0)]->CompareTo("White King") == 0)
			{
				Skakiera[(5),(0)] = "White Rook";
				Skakiera[(7),(0)] = "";
				//Console::WriteLine( "� ������ ����� ����� ����." ); // Changed in version 0.5
			}
			else if (Skakiera[(2),(0)]->CompareTo("White King") == 0)
			{
				Skakiera[(3),(0)] = "White Rook";
				Skakiera[(0),(0)] = "";
				//Console::WriteLine( "� ������ ����� ������ ����." ); // Changed in version 0.5
			}
		}
		else if (m_PlayerColor->CompareTo("Black") == 0)
		{
			if (Skakiera[(6),(7)]->CompareTo("Black King") == 0)
			{
				Skakiera[(5),(7)] = "Black Rook";
				Skakiera[(7),(7)] = "";
				//Console::WriteLine( "� ������ ����� ����� ����." ); // Changed in version 0.5
			}
			else if (Skakiera[(2),(7)]->CompareTo("Black King") == 0)
			{
				Skakiera[(3),(7)] = "Black Rook";
				Skakiera[(0),(7)] = "";
				//Console::WriteLine( "� ������ ����� ������ ����." ); // Changed in version 0.5
			}
		}

		// restore the Castling_Occured variable to false, so as to avoid false castlings in the future!
		Castling_Occured = false;

	}


	//////////////////////////////////////////////////////////
	// does a pawn needs promotion?
	//////////////////////////////////////////////////////////

	//PawnPromotion();

	m_WhoPlays = "Human";                       

	// it is the other color's turn to play
	if (m_WhichColorPlays->CompareTo("White") == 0)   
		m_WhichColorPlays = "Black";                  
	else if (m_WhichColorPlays->CompareTo("Black") == 0)
		m_WhichColorPlays = "White";

	//////////////////////////////////////////
	// RECORDING IN OPENING BOOK
	//////////////////////////////////////////

	bool recordyn = false;
	Console::Write("Record position and your suggested move in opening book (Y/N)?  ");
	String^ answer = Console::ReadLine();

	if((answer->CompareTo("Y")==0)||(answer->CompareTo("y")==0))
		recordyn = true;
	else if((answer->CompareTo("N")==0)||(answer->CompareTo("n")==0))
		recordyn = false;

	int opening = 1;
	// ������� ��� ������� .txt ��� �������� � ���� ��������� ��� ��
	StreamReader^ sr = gcnew StreamReader(String::Concat("Huo Chess Opening Book\\",opening.ToString(),".txt"));
	bool exit_opening_loop = false;

	do
	{
		if( File::Exists(String::Concat("Huo Chess Opening Book\\",opening.ToString(),".txt")) )
		{
			match_found = true;

			for (iiii = 0; iiii <= 7; iiii++)
			{
				for (jjjj = 0; jjjj <= 7; jjjj++)
				{
					line_in_opening_book = sr->ReadLine();
					if(Skakiera0[iiii,jjjj]->CompareTo(line_in_opening_book) != 0)
						match_found = false;
				}
			}

			if(match_found == true)
			{
				where_is_the_match = opening;
				exit_opening_loop = true;
			}
		}
		else
		{
			exit_opening_loop = true;
		}

		opening = opening + 1;
	}while(exit_opening_loop == false);

	sr->Close();

	// Record position and move in the opening book
	if((recordyn==true)&&(match_found == false))
	{
		// ������� ��� ������� .txt ��� �������� � ���� ��������� ��� ��
		StreamWriter^ sw = gcnew StreamWriter(String::Concat("Huo Chess Opening Book\\",(opening-1).ToString(),".txt"));

		for (iiii = 0; iiii <= 7; iiii++)
		{
			for (jjjj = 0; jjjj <= 7; jjjj++)
			{
				sw->WriteLine(Skakiera0[iiii,jjjj]->ToString());
			}
		}

		sw->WriteLine("BELOW FOLLOW THE SUGGESTED MOVE FOR THAT POSITION");
		sw->WriteLine(m_StartingColumnNumber.ToString());
		sw->WriteLine(m_StartingRank.ToString());
		sw->WriteLine(m_FinishingColumnNumber.ToString());
		sw->WriteLine(m_FinishingRank.ToString());
		sw->Close();
	}
	
	if(match_found == true)
		Console::WriteLine(String::Concat("Position already in memory at opening book page ", where_is_the_match.ToString(), ".\nPlease replace the move in the book manually!"));

	//////////////////////////////////////
	// END RECORDING IN OPENING BOOK
	//////////////////////////////////////

	// restore variable values to initial values
	m_StartingColumn = "";
	m_FinishingColumn = "";
	m_StartingRank = 1;
	m_FinishingRank = 1;

	}
	
	else
	{
		Console::WriteLine("INVALID MOVE!");
		Skakiera[(m_StartingColumnNumber - 1),(m_StartingRank - 1)] = MovingPiece;
		MovingPiece = "";
		m_WhoPlays = "Human";
	}



	/////////////////////////////////////////////
	// CHECK MESSAGE
	/////////////////////////////////////////////

	//WhiteKingCheck = CheckForWhiteCheck(Skakiera);
	//BlackKingCheck = CheckForBlackCheck(Skakiera);

	//if ((WhiteKingCheck==true)||(BlackKingCheck==true))
	//{
	//	Console::WriteLine("CHECK!");
	//}




	}

void Starting_position(void)                 
{  
		// TODO: Add your control notification handler code here

	for(int a=0;a<=7;a++)
	{
		for(int b=0;b<=7;b++)
		{
			Skakiera[(a),(b)] = "";
		}
	}

			Skakiera[(0),(0)] = "White Rook";
			Skakiera[(0),(1)] = "White Pawn";
			Skakiera[(0),(6)] = "Black Pawn";
			Skakiera[(0),(7)] = "Black Rook";
			Skakiera[(1),(0)] = "White Knight";
			Skakiera[(1),(1)] = "White Pawn";
			Skakiera[(1),(6)] = "Black Pawn";
			Skakiera[(1),(7)] = "Black Knight";
			Skakiera[(2),(0)] = "White Bishop";
			Skakiera[(2),(1)] = "White Pawn";
			Skakiera[(2),(6)] = "Black Pawn";
			Skakiera[(2),(7)] = "Black Bishop";
			Skakiera[(3),(0)] = "White Queen";
			Skakiera[(3),(1)] = "White Pawn";
			Skakiera[(3),(6)] = "Black Pawn";
			Skakiera[(3),(7)] = "Black Queen";
			Skakiera[(4),(0)] = "White King";
			Skakiera[(4),(1)] = "White Pawn";
			Skakiera[(4),(6)] = "Black Pawn";
			Skakiera[(4),(7)] = "Black King";
			Skakiera[(5),(0)] = "White Bishop";
			Skakiera[(5),(1)] = "White Pawn";
			Skakiera[(5),(6)] = "Black Pawn";
			Skakiera[(5),(7)] = "Black Bishop";
			Skakiera[(6),(0)] = "White Knight";
			Skakiera[(6),(1)] = "White Pawn";
			Skakiera[(6),(6)] = "Black Pawn";
			Skakiera[(6),(7)] = "Black Knight";
			Skakiera[(7),(0)] = "White Rook";
			Skakiera[(7),(1)] = "White Pawn";
			Skakiera[(7),(6)] = "Black Pawn";
			Skakiera[(7),(7)] = "Black Rook";

			m_WhichColorPlays = "White";
}


	
};


int main(array<System::String ^> ^args)
{
    // TODO: Please replace the sample code below with your own.

	HuoOpeningEditor_main^ huo = gcnew HuoOpeningEditor_main();
	huo->Game();

    return 0;
}



By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Palavos
Software Developer Kakos Bros Solutions
Greece Greece
Spiros [Spyridon or Spyros are also used] Kakos (huo) lives in Athens, Greece. He is currently working as an IT consultant in a large firm. Begun programming during the Commodore era in MS Basic and is still trying to learn (mostly in C++ and C#)...
He likes chess and has recently bought a new (old) modem for one of his Commodores 128 (yes, he has two of them!) to set up a server based on 8-bit technology. He thinks that when the World Wide Web crashes completely by an alien cyber attack, he will be the only one capable of surfing with his Commodore computer and will eventually save the day...
He likes reading and writting philosophy and is a fond admirer of Aristotle and Alfred Russel Wallace. His main heritage is Harmonia Philosophica.
At his free time he is researching the application of polypyrrole (PPy) in the PCB manufacturing process (through-hole plating) at the National Technical University of Athens - Advanced Materials section.
Follow on   Twitter

| Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 23 Aug 2014
Article Copyright 2007 by Palavos
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid