<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tomas Guajardo</title>
    <description>The latest articles on DEV Community by Tomas Guajardo (@tguajardo).</description>
    <link>https://dev.to/tguajardo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2068834%2F6c3edcc7-0614-4701-9fb1-18edb6c0b8f9.jpeg</url>
      <title>DEV Community: Tomas Guajardo</title>
      <link>https://dev.to/tguajardo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tguajardo"/>
    <language>en</language>
    <item>
      <title>Mastering Tic-Tac-Toe with Python: A Journey into Game Development</title>
      <dc:creator>Tomas Guajardo</dc:creator>
      <pubDate>Fri, 13 Sep 2024 15:48:46 +0000</pubDate>
      <link>https://dev.to/tguajardo/mastering-tic-tac-toe-with-python-a-journey-into-game-development-1bfj</link>
      <guid>https://dev.to/tguajardo/mastering-tic-tac-toe-with-python-a-journey-into-game-development-1bfj</guid>
      <description>&lt;h3&gt;
  
  
  Introduction: Why Tic-Tac-Toe?
&lt;/h3&gt;

&lt;p&gt;When someone, especially ME, wants to learn something, making it interesting is the way to go, as my 5-year-old is fascinated with tic tac toe creating a game about it seems like a good way to save some paper.&lt;/p&gt;

&lt;h3&gt;
  
  
  Brainstorming: from classical game to code.
&lt;/h3&gt;

&lt;p&gt;As any good project is important to start by setting some notions down, in this case the logic of the game, winning conditions, end game conditions and how to input the player moves. This produced three classes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Board&lt;/li&gt;
&lt;li&gt;Players&lt;/li&gt;
&lt;li&gt;Game&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each trying to be as modular and simple as possible to ensure a code readable and easy to maintain.&lt;/p&gt;

&lt;h3&gt;
  
  
  What's next? OH right the code.
&lt;/h3&gt;

&lt;p&gt;For a detailed look please revise the GitHub:&lt;br&gt;
&lt;a href="https://github.com/tguajardo/tictactoe" rel="noopener noreferrer"&gt;Tic Tac Toe Game&lt;/a&gt;&lt;br&gt;
The most interesting and, somehow, difficult part for me was the display function.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe7hdo1spuxufnhf5ylbi.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe7hdo1spuxufnhf5ylbi.gif" alt="Tic Tac Toe render" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion: The Learning Experience.
&lt;/h3&gt;

&lt;p&gt;This was a fun project to do, it helped me internalize programming concepts that I have always overlooked.&lt;/p&gt;

&lt;p&gt;As a &lt;em&gt;funny&lt;/em&gt; end note, tic tac toe is known in my country as &lt;strong&gt;"Gato"&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>python</category>
      <category>github</category>
      <category>codeacademy</category>
    </item>
  </channel>
</rss>
