By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
World of SoftwareWorld of SoftwareWorld of Software
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Search
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
Reading: The Odin Project’s Chess Game Took Me Weeks to Finish—And I’d Still Do It Again | HackerNoon
Share
Sign In
Notification Show More
Font ResizerAa
World of SoftwareWorld of Software
Font ResizerAa
  • Software
  • Mobile
  • Computing
  • Gadget
  • Gaming
  • Videos
Search
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Have an existing account? Sign In
Follow US
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
World of Software > Computing > The Odin Project’s Chess Game Took Me Weeks to Finish—And I’d Still Do It Again | HackerNoon
Computing

The Odin Project’s Chess Game Took Me Weeks to Finish—And I’d Still Do It Again | HackerNoon

News Room
Last updated: 2025/05/12 at 9:53 AM
News Room Published 12 May 2025
Share
SHARE

Hey everyone! It’s been a while since my last article, as life got pretty busy after wrapping up my Connect Four project. Anyway, I’ve been making slow but steady progress on the Chess Game, which is the final Ruby project from The Odin Project’s curriculum. Honestly, it’s been quite the journey: fun, massive, intense, and sometimes really frustrating. I figured I’d share my experience to help anyone else gearing up to tackle it, trust me, it’s not as scary as it seems!

Starting the Chess Project

Believe it or not, I started mentally preparing for Chess long before even beginning Connect Four. I’d caught snippets of conversations on Discord, and people kept saying how huge and complicated it was. What really caught my eye was how everyone seemed stuck around the 70% completion mark. Another thing is that many folks skipped Test Driven Development because of how huge this project was. That was enough info for me at this point, I didn’t want any spoilers, so I stopped reading!

When I finally got around to starting, my first step was drafting some pseudocode and getting the basic logic straight in my head. I had a few ideas, but I couldn’t shake the memory of the Knight Travails project, which I’d thought would help me solve the Chess challenge.

my pseudo, pseudocodemy pseudo, pseudocode

Why I Paused TDD (and Why You Might Too)

Initially, I focused on designing the chessboard and creating all the chess pieces to display them clearly in the console, no moves yet, just the basics. At first, being a good student, I wanted to follow TDD right from the start. But pretty quickly, I realized why everyone had warned it was tough.

I managed to write some basic tests for early methods, but soon enough, I was staring at my screen overwhelmed. Each problem I solved seemed to spawn two more, like some frustrating spiderweb. Eventually, I set TDD aside just to focus on making progress. I felt a bit guilty ditching tests because I genuinely liked them during Connect Four.

However, I promised myself I’d circle back once everything was up and running smoothly.

Navigating Chess Piece Logic (and the Headaches It Caused)

At this stage, I had a rough game class, a method to handle rounds, and my board displaying nicely but zero moves programmed. It was time to roll up my sleeves and start coding chess moves. I knew I’d need special pawn moves and king-rook castling eventually, but decided to start with basic movements first. Knight Travails was helpful, or so I thought.

knight travails methodknight travails method

It didn’t take long to hit another snag: chess isn’t just about movement, but also about dealing with other pieces. So I had to go back, refactor the code, and figure out how to handle situations like taking opponent pieces or preventing moves onto spaces already occupied by your own pieces.

Honestly, that refactoring part was a total pain, especially after finishing the knight’s moves only to realize the knight “jumps” rather than slides, forcing yet another rewrite.

knight moves after correctionknight moves after correction

Once basic moves were finally done, I tackled the special pawn moves like advancing two squares on their first move, which was tricky but manageable. Castling, though, was another beast altogether! I actually took a break to clear my head, switching back to refining the game class, adding clarity, extra variables, and cleaning things up.

By this point, things were coming together, and castling started to look less intimidating. But now I knew JSON serialization was looming, and frankly, that scared me even more than castling did!

After a few intense hours, I finally conquered castling, minus a couple of debugging sessions that nearly drove me nuts. Once sorted, I realized my prompts to the player were broken, so I fixed those too.

bit of castling movementbit of castling movement

A Short Break and Battling JSON in Poland

Right after this, I took a much-needed holiday in Poland. It was my first trip abroad in three years, delayed by waiting for settled status. I’d ambitiously promised myself I’d code every morning from 6:30 to 11, but you know how it goes…

Friends called, family invited me over for coffee and cake, and suddenly coding turned into just an hour per day. But honestly, the downtime helped me recharge, even though it completely wrecked my sleep schedule!

trip to Polandtrip to Poland

While in Poland, I tackled JSON serialization because I’d struggled with it before and needed to get comfortable with it. Honestly, it was incredibly frustrating. Everyone online seems to talk casually about JSON, but organizing everything into hashes, especially nested ones for chess pieces, was brutal. Maybe my design made things harder than necessary. Anyway, after three tough weeks, I finally nailed it!

a bit of JSON implementationa bit of JSON implementation

Back in the UK, my final week was dedicated to tests (yes, I finally returned to TDD!) and polishing prompts with some colorful console messages to make gameplay clearer and more enjoyable. And guess what? It’s DONE!

now a bit of RSPEC dopamine hitnow a bit of RSPEC dopamine hit

I’m genuinely thrilled to be finished this project felt like it took forever! Now, I can finally move forward. No rush, obviously, but I’m excited for what’s next.

My Best Tips for Tackling the Chess Project

If you’re about to tackle this Chess Game, my main advice is patience. Take your time upfront to really map out your design. Grab a pen and paper, jot down your ideas, and plan thoroughly. Trust me, skipping proper planning landed me in a mess of redundant code and wasted effort. A couple more hours of preparation could’ve saved me heaps of trouble.

Good luck, and more importantly, have fun with it!

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Twitter Email Print
Share
What do you think?
Love0
Sad0
Happy0
Sleepy0
Angry0
Dead0
Wink0
Previous Article I tried out Notion Mail but am switching back to Gmail — here’s why
Next Article Virgin Media O2, Daisy Group merge to form B2B comms company | Computer Weekly
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

248.1k Like
69.1k Follow
134k Pin
54.3k Follow

Latest News

Trump Kills 'Woke' Broadband Program Because It Has the Word 'Equity'
News
The World’s First Hearing Aid with Dual Processing Is Here
News
The Brains Behind the Brain: A Pioneer in Vibe Trading – An Interview with the Founders of AssetSwap.AI
Gadget
Permanent ‘training wheels’ of AI ‘inhibits student learning’
Software

You Might also Like

Computing

10 Best Canva Alternatives & Competitors in 2025 |

28 Min Read
Computing

How Tokenizer Choices Shape Hidden Risks in Popular Language Models | HackerNoon

14 Min Read
Computing

Google Cloud Greater China President Kathy Lee reportedly stepping down; Microsoft veteran Bin Shen tapped as successor · TechNode

2 Min Read
Computing

Top 11 Google Docs Alternatives for 2025 |

25 Min Read
//

World of Software is your one-stop website for the latest tech news and updates, follow us now to get the news that matters to you.

Quick Link

  • Privacy Policy
  • Terms of use
  • Advertise
  • Contact

Topics

  • Computing
  • Software
  • Press Release
  • Trending

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

World of SoftwareWorld of Software
Follow US
Copyright © All Rights Reserved. World of Software.
Welcome Back!

Sign in to your account

Lost your password?