Skip to content

AstroRedstone100/Games

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is the README file for Chess version 2. You might be wondering where version 1 is. The truth is that I chose not to publish version 1 
because it is less optimized and has many bugs in check and mate detections. More about that later.

                                               ---IMPLEMENTATION---
Now, let's focus on version 2. At first, I initialized the board using simple cell structs and a vector. After that I load the textures
using a loop and then assign them to the pieces based on the first repre vector after that, I replace the IDs of the repre vector with the
indices of the pieces that are 'present' there. Based on chess rules, I created the moves() function and then notlegal() and notation()
functions. Using check() and notlegal(), I created the movailable() function. A very smart trick that I used to avoid remapping the entire
board after doing an invalid move is restoring the entire vector with its copies.

                                                  ---BUGS---
According to my analysis and tests, this version has no errors. If you find any, please report them to me. The bugs that I encountered while
making the program were all about state-management like passing a variable in a function with reference when it is not supposed to or
forgetting that repre now contains indices and not IDs. I also want to be transparent about my development process. I used AI primarily as a
debugging assistant to help trace program state and locate bugs. For a project of this size, manually tracing every variable on paper
becomes tedious and error-prone. However, none of the implementation or game logic was generated by AI. Every algorithm and design decision
in this project was written and developed by me.

About

A bunch of games recreated by me.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages