<?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: Tensie</title>
    <description>The latest articles on DEV Community by Tensie (@tensie_24f10fe37a08dc7d0d).</description>
    <link>https://dev.to/tensie_24f10fe37a08dc7d0d</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%2F3616359%2Fd6ed67f4-d525-43ab-8011-aac7c68f8339.png</url>
      <title>DEV Community: Tensie</title>
      <link>https://dev.to/tensie_24f10fe37a08dc7d0d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tensie_24f10fe37a08dc7d0d"/>
    <language>en</language>
    <item>
      <title>Chess Engine</title>
      <dc:creator>Tensie</dc:creator>
      <pubDate>Mon, 17 Nov 2025 22:28:54 +0000</pubDate>
      <link>https://dev.to/tensie_24f10fe37a08dc7d0d/chess-engine-48kl</link>
      <guid>https://dev.to/tensie_24f10fe37a08dc7d0d/chess-engine-48kl</guid>
      <description>&lt;p&gt;So yesterday i started working on my chess engine, written in c++,i'm writing these blogs and a couple more i'll write in the future for quite a selfish reason (to track my progress) and also because i want someone else, confused like me in the future to use this, hopefully, as a road map to write their engine.&lt;/p&gt;

&lt;p&gt;right so i started yesterday, i started with well board representation, I'm a programmer not a writer so please forgive my fuck ups here and there, some times i won't make sense but lie to yourself and pretend you do understand what i'm on.&lt;/p&gt;

&lt;p&gt;I chose the most intuitive approach, the 8x8 array representation.&lt;br&gt;
i basically made an enum, something like this&lt;br&gt;
`&lt;br&gt;
enum {empty, whitepawn, whiteknight..., blackking};&lt;/p&gt;

&lt;p&gt;`&lt;br&gt;
from there i basically hard-coded each each in the 8x8 array.&lt;/p&gt;

&lt;p&gt;and then proceeded to have print function, which prints the pieces on the console, it maps a string i hard-coded to the enum values.&lt;/p&gt;

&lt;p&gt;something like &lt;/p&gt;

&lt;p&gt;1.pieces = " PNBRQKpnbrqk"&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;loop through array[8x8]&lt;/li&gt;
&lt;li&gt;check if array[i][j]!=empty
if yes print " . "
if no
print pieces[array[i][j]]&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  about this pieces[array[i][j]]
&lt;/h2&gt;

&lt;p&gt;it works only because the string indices and the enum piece value match, hopefully that makes sense&lt;/p&gt;

&lt;p&gt;right now i just implemented a simple no rule move function&lt;br&gt;
it receive from coordinates and to coordinates&lt;br&gt;
manipulates the array by making from coordinate empty and to coordinate with the previous from coordinate, the  re-prints&lt;br&gt;
the board.&lt;/p&gt;

&lt;p&gt;this is my repo to keep up if you like&lt;br&gt;
&lt;a href="https://github.com/PainIam/Pain_ENGINE" rel="noopener noreferrer"&gt;https://github.com/PainIam/Pain_ENGINE&lt;/a&gt; &lt;/p&gt;

</description>
      <category>learning</category>
      <category>cpp</category>
    </item>
  </channel>
</rss>
