![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Registered User
Join Date: Dec 2004
Location: norcal
Posts: 11
|
In tic tac toe what is the fewest moves your opponent..
In tic tac toe what is the fewest moves your opponet can make before you know you can win?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Oct 2004
Posts: 492
|
![]() ![]()
__________________
# 589 092 179 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Too lazy to set a custom title
Join Date: Nov 2002
Location: Earth
Posts: 14,622
|
one if you go first.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jul 2004
Location: Chatsworth, CA
Posts: 1,699
|
YOU GOTTA BE FUCKIN KIDDING!
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
So Fucking Banned
Join Date: Nov 2004
Posts: 312
|
using System;
using System.Collections; using System.Drawing; namespace tictactoe_basic { /// <summary> /// Summary description for TTTModel. /// </summary> public class TTTModel { private Players mPlayers = new Players(); private StatusDetector mStatus = new StatusDetector_Hardcoded(); private TTTBoard mBoard = new TTTBoard(); public TTTModel() { mBoard.NewGame(); } public delegate void UpdatedModel(); public event UpdatedModel Updated; public StatusDetector.ResultEnum Result { get { return mStatus.GetStatus(mBoard); } } public bool MyTurn { get { return mPlayers.MyTurn; } } public void SetPlayerType(Player p) { mPlayers.SetPlayerType(p); } public void MakeMove(GridCoordinate gc) { if (Result != StatusDetector.ResultEnum.NotDone) return; if (mBoard.CellOccupied(gc)) return; mPlayers.Move(mBoard, gc); mPlayers.NextPlayer(); NotifyOfUpdate(); if (Result != StatusDetector.ResultEnum.NotDone) return; if (!mPlayers.CurrentPlayerIsHuman()) { mPlayers.Move(mBoard, mPlayers.CurrentPlayersMove(mBoard)); mPlayers.NextPlayer(); NotifyOfUpdate(); } } public bool CellIsX(GridCoordinate gc) { return mBoard.CellIsX(gc); } public bool CellIsO(GridCoordinate gc) { return mBoard.CellIsO(gc); } public void NewGame() { mPlayers.NewGame(); mStatus.NewGame(); mBoard.NewGame(); NotifyOfUpdate(); } public GridCoordinate GetWinnerSlashStart { get {return mStatus.GetWinnerSlashStart; } } public GridCoordinate GetWinnerSlashEnd { get {return mStatus.GetWinnerSlashEnd; } } private void NotifyOfUpdate() { if (Updated != null) Updated(); } } } |
![]() |
![]() ![]() ![]() ![]() ![]() |