Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 1.88 KB

README.md

File metadata and controls

19 lines (14 loc) · 1.88 KB

The Odin Project Challenges

Tic Tac Toe

This is my first project with creating classes and establishing logic how the instances of these classes interact with each other. At first I did not know how to start approaching the problem as I was used to solving smaller challenges by just writing and calling methods. This was my first experience in setting my mind for object oriented programming and I really enjoyed it. I spent a lot of time drawing out the logic of the game on paper before starting coding and once it was done the actuall coding part went faster than I had expected. I struggled with figuring out how to call an instance method of "B" class from an instance method of "A" class and learned that an instance of one class can be passed as an argument to a method of a different class.

Mastermind

Learnt how to organize code by separating modules. Struggled with cutting my methods into smaller ones and creating descriptive method names.

Hangman

Learnt how to write to and read from files. Learnt how to work with .yml files to save user's state of the game and implement save/load functionality.

Custom enumerables

This challenge by far is my favourite. It was really benifical to implement methods that I take for granted and simply use them when needed. This was a good practice to use "yield" keyword and understand that blocks have a return value.

Recursion

With recursion I benefit the most if I go through the algorithm on paper first before implementing it in code. Fibonacci sequence challenge was relatively easy but merge sort algorithm was difficult to code. I managed to implement the first part of the code successfully where the array is being cut in half recursively but writing code for sorting numbers was a struggle. It all comes down to really understanding what is happening in the code, where are the return values being saved and how they are used further.