Skip to main content
deleted 418 characters in body; edited title
Source Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237

Clean and well-designed Tic-Tac-Toe feedback requestedgame

I just started learning coding about 4 months ago, I think Tic-tac-toeMy design goal was the first application that I've ever written in C# not counting the mandatory "Hello, World!".

So for me, I really wanted to revisit this gametry and codemake a new one, unfortunately I don't have the original code anymore,"clean" and well-designed Tic-Tac-Toe game but I can assure youalso to try and use concepts and programming constructs that it was a lot worse than whatever mess I've thrown together now ;)I'm new to.

Anyhow, as always both positive and negative feedback is welcome. My design goal wasI'm planning to try and make a "clean" and well designedimplement an "AI Player" class later on. I know that Tic-tacTac-toeToe is a solved game so there are more effective approaches for AI logic but alsoI've never programmed an AI before so my idea is to try and use conceptsat runtime generate a "database" of all possible gamestates, and programming constructs that I'm newthen have the AI rank each "intermediate gamestate" by the amount of positive outcomes (that is where the AI wins) - negative outcomes when it decides where to place its marker. Would this be a good idea and would it work at all?

Bonus question: I'm planning to implement an "AI Player" class later on, I know that Tic-tac-toe is a solved game so there are more effective approaches for AI logic but I've never programmed an AI before so my idea is to at runtime generate a "database" of all possible gamestates, and then have the AI rank each "intermediate gamestate" by the amount of Both positive outcomes (that is where the AI wins) -and negative outcomes when it decides where to place it's markerfeedback is welcome. Would this be a good idea? / Work at all?

Tic-Tac-Toe feedback requested

I just started learning coding about 4 months ago, I think Tic-tac-toe was the first application that I've ever written in C# not counting the mandatory "Hello, World!".

So for me, I really wanted to revisit this game and code a new one, unfortunately I don't have the original code anymore, but I can assure you that it was a lot worse than whatever mess I've thrown together now ;).

Anyhow, as always both positive and negative feedback is welcome. My design goal was to try and make a "clean" and well designed Tic-tac-toe game but also to try and use concepts and programming constructs that I'm new to.

Bonus question: I'm planning to implement an "AI Player" class later on, I know that Tic-tac-toe is a solved game so there are more effective approaches for AI logic but I've never programmed an AI before so my idea is to at runtime generate a "database" of all possible gamestates, and then have the AI rank each "intermediate gamestate" by the amount of positive outcomes (that is where the AI wins) - negative outcomes when it decides where to place it's marker. Would this be a good idea? / Work at all?

Clean and well-designed Tic-Tac-Toe game

My design goal was to try and make a "clean" and well-designed Tic-Tac-Toe game but also to try and use concepts and programming constructs that I'm new to.

I'm planning to implement an "AI Player" class later on. I know that Tic-Tac-Toe is a solved game so there are more effective approaches for AI logic but I've never programmed an AI before so my idea is to at runtime generate a "database" of all possible gamestates, and then have the AI rank each "intermediate gamestate" by the amount of positive outcomes (that is where the AI wins) - negative outcomes when it decides where to place its marker. Would this be a good idea and would it work at all?

Both positive and negative feedback is welcome.

edited tags
Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237
added 2 characters in body; edited tags
Source Link
palacsint
  • 29.9k
  • 9
  • 81
  • 156
class VisualCell : Button
{
    #region Fields & Properties

    public Tuple<int, int> CellPos { get; set; } 


    protected override bool ShowFocusCues
    {
        get
        {
            return false;
        }
    }

    #endregion

    #region Constructors

    public VisualCell(): base()
    {

        this.SetStyle(ControlStyles.Selectable, false);
    }

    #endregion
}
class VisualCell : Button
{
    #region Fields & Properties

    public Tuple<int, int> CellPos { get; set; }

    protected override bool ShowFocusCues
    {
        get
        {
            return false;
        }
    }

    #endregion

    #region Constructors

    public VisualCell(): base()
    {

        this.SetStyle(ControlStyles.Selectable, false);
    }

    #endregion
}
class VisualCell : Button
{
    #region Fields & Properties

    public Tuple<int, int> CellPos { get; set; } 


    protected override bool ShowFocusCues
    {
        get
        {
            return false;
        }
    }

    #endregion

    #region Constructors

    public VisualCell(): base()
    {

        this.SetStyle(ControlStyles.Selectable, false);
    }

    #endregion
}
Tweeted twitter.com/#!/StackCodeReview/status/447417166816886784
Source Link
Overly Excessive
  • 1.4k
  • 3
  • 11
  • 22
Loading