• 0 Posts
  • 67 Comments
Joined 8 months ago
cake
Cake day: October 19th, 2024

help-circle

  • Lovable Sidekick@lemmy.worldtoProgrammer Humor@programming.devCoding chess
    link
    fedilink
    English
    arrow-up
    31
    arrow-down
    3
    ·
    10 hours ago

    This reminds me of one of my very first programs, a tic-tac-toe game I wrote in high school. It displayed hardcoded grids of Xs and Os and blanks very similar to what’s shown here. This approach worked because of the much more limited move possibilities. The program could always win if it made the first move, and always win or tie if the human moved first, depending on if the human made mistakes. I wish I still had the code.