Property | Type | Description | |
---|---|---|---|
ClearStatusText | void | ||
DidSomeoneWin | string | ||
GameOver | void | ||
InitializeBoard | void | ||
LockGameboard | void | ||
NewGame | void | ||
PiecesAvailable | bool | ||
Play | void | ||
ShowWinningLine | void | ||
UnLockGameboard | void | ||
UpdateStatus | void | ||
UpdateUiFromMove | void | ||
_initBoard | void | ||
_updateStatus | void | ||
appbarEndGame_Click | void | ||
appbarHideDiag_Click | void | ||
appbarNewGame_Click | void | ||
tb_Tap | void |
Method | Description | |
---|---|---|
MainPage ( ) : System | ||
showResult ( String result ) : void |
Method | Description | |
---|---|---|
OnNavigatedFrom ( System e ) : void | ||
OnNavigatingFrom ( System e ) : void |
Method | Description | |
---|---|---|
ClearStatusText ( ) : void | ||
DidSomeoneWin ( ) : string |
Hard-coded game logic to keep things simple. There are 8 possible ways someone can get a winning line. I check for each one here.
|
|
GameOver ( ) : void |
Lock the gameboard when the game is over
|
|
InitializeBoard ( ) : void |
Clear all board pieces and reset their text color. Also resets the mapping of gamepiece to value
|
|
LockGameboard ( ) : void | ||
NewGame ( ) : void |
Refreshes the game board and informs the user what gamepiece they are playing
|
|
PiecesAvailable ( ) : bool |
Check to see if there are any squares on the board still in play
|
|
Play ( TextBlock tbTapped, TicTacToeAppWarp.MoveMessage msg ) : void |
Play the selected piece.
|
|
ShowWinningLine ( TextBlock w1, TextBlock w2, TextBlock w3 ) : void |
Add a little bling to the gameboard by showing the winning line in a different color
|
|
UnLockGameboard ( ) : void | ||
UpdateStatus ( string status ) : void |
Helper method to write a simple status update to a TextBlock on the page. Uses the Dispatcher object if currently not on UI Thread.
|
|
UpdateUiFromMove ( TicTacToeAppWarp.MoveMessage msg ) : void | ||
_initBoard ( ) : void |
Clear all text on the board, reset font color and clear out internal gamepiece map
|
|
_updateStatus ( string status ) : void | ||
appbarEndGame_Click ( object sender, |
||
appbarHideDiag_Click ( object sender, |
||
appbarNewGame_Click ( object sender, |
||
tb_Tap ( object sender, GestureEventArgs e ) : void |
Event handler for the Tap event on each gamepiece
|
protected OnNavigatedFrom ( System e ) : void | ||
e | System | |
return | void |
protected OnNavigatingFrom ( System e ) : void | ||
e | System | |
return | void |