A Simple Chess Game for ASP.NET
Creating a Chess game is fairly simple with Gaia Ajax. Three different custom server
controls where created to simulate the Board, Square and Piece. The object model was developed
separately and is presentation layer independent.
Note: This chess game is not complete. It was only created to serve as an example of
how to use Gaia Ajax to created sophisticated UIs. Certain moves are not yet implemented
and the game currently halts when the king is checked. Feel free to complete the game and
publish it on CodeProject if you want.
Who's turn
Markup (ASPX/.aspx)
1:
2:
3: <div class="current-player">
4: <p>Who's turn</p>
5: <gaia:Image ID="zWhosNext" runat="server" ImageUrl="img/white_pawn.png" />
6: </div>
7:
8: <br style="clear:both;" />
9:
10: <gaia:Panel
11: runat="server"
12: ID="c">
13:
14: </gaia:Panel>
15:
16: