Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void Page_Load(object sender, EventArgs e)
- {
- if (ViewState.Count <= 0)
- {
- InitializeBoard();
- this.turn = 0;
- }
- if (IsPostBack)
- {
- this.tictactoe = (Dictionary<int[,], int>)ViewState["tictactoe"];
- this.board = this.tictactoe.Keys.First();
- this.turn = this.tictactoe.Values.First();
- }
- if ((this.turn % 2 == 1) || this.turn ==0)
- {
- ComputerPlay();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment