Chess Knight Possible Moves Algorithm with Drawing

At first, I will define and explain the algorithm and its solution with a drawing. At the end of the post, I will show you how I solve the algorithm in Java. Problem Our algorithm will progress on a classic 8x8 chessboard that is empty. We will give the algorithm the abscissa and ordinate of the position where we put the knight, and the algorithm will try to find out how many different points the knight can move in this position. Solution The chess coordinates are like the picture on the left; b3, c2, and so on. But when solving the knight jump algorithm, we will think like the picture on the right. The abscissa and ordinate will be numeric values such as (1, 1) or (2, 3). Why do we think this way? Let's explain with a Coordinate System. Let's place this Coordinate System on the knight, like below. But for easier understanding, let's first place it in the area where the knight can move the most move on the chessboard. Now, you can see the knight can 8 different moves. Also,

Fixture Generating Algorithm Easiest Describe with Drawing

I will explain how to create a fixture algorithm regardless of the programming language. But if you want to see how I write in Java, you can check my GitHub link. So, let's start. When we are building a fixture-generating algorithm, we have to know two basic things; The teams will match one time or two times? How many teams are there? (n) We can get the answers that we need with the above questions. How many teams will match every round? : All teams can bisect. (n/2) How many rounds will there be? - If teams will match just once: All teams minus one. (n-1) - If teams will match twice: All teams minus one and multiplied by two. ((n-1) x 2) The last question means; What will be the size of our match list? When we create a loop, we will use just (n-1) and will not use the second one (n-1)x2 The Algorithm with Drawing For example, let's think at first algorithm had that below teams; Then we can say we have 4 teams, which means n = 4 so in each round, the teams will match 4/2 = 2 t

Bad Plan is Better Than No Plan

Image Sometimes everything goes down or sometimes everything could be super good. I think, at these times we cannot see the process and at that time we can forget something that we need to finish. Because of the peak points of feel, our mind can change our focus in a way that we do not want at that moment. In my opinion, because of that, we need a plan. Maybe our plan cannot be good enough but every plan can be better than no plan. If we have any plan, we can focus on what we need to focus on at that moment. It means, your focus can change with your feelings but if you have any plan you can focus on what you need again. If we have any plan, we can design our process from beginning to finish and change the process we don't like. So, if something blocks you to do your business, you have to know that if you have any plan you can change or redesign again your plan. Who has any plan can spend time with his or her hobbies freely. I think hobbies are expensive in many wa

Success Can Be a Piece of Luck?

The picture is from What do you think about luck? And what do you think about success? Success can be a piece of luck? In my opinion, every lucky person is hardworking about their job, if you think some people are not hardworking but also lucky, then I can say it's not a success. So, I mean success only comes with your work about it. If you didn't work and you got your job without working about it, I'm sorry it's not a success. I think every successful work hides behind them a plan. If you want to finish your any work within success you have to make a plan. And every good plan will make you a lucky person. But, something just occurred to me, if you have a plan, you have to implement your plan. You have to act with your plan. If you can't implement your plan, a stand-alone plan cannot carry you to success. So, finally, I will say; success cannot be a piece of luck. Success only can be a piece of a good viable plan. If you want to write your opinion you c

How am I Using the to Improve My English

  Image-1: Logo - I think singing a song is one of the good ways to learn new English words and phrases. Also, you can repeat your new words and phrases easily. Because rhythm in the song will help you to remember the lyrics of the songs. Here's how am I use to improve my English. Choose a song that you like the beat. If you don't know any English songs, at first it could be hard to choose a song but no worry. You can search on Google for example, "the best English songs in 2020". You're going to see many songs. Well, now you can choose one of them. Only listen to it. And now only listen to the song that you choose. If it has a clip you can watch it. If there are words you don't know no worry. Only listen to it. Do you like the song? Let's continue then. Image-2: Karaoke mode. Open the song on and select Karaoke. Well, now only focus on the lyrics of the song. And also analyze the words and phrases t

What Am I Doing to Improve My English Skills? - Improving English Skills - Listening - Speaking - Writing - Reading

I am going to write directly about what I am doing to improve my English skills. So, you should know it. When I was at the beginner level, I was mostly studying grammar. But now, I don't care. Now, I'm only focusing to understand what I'm reading or listening to and what I'm speaking and how can I speak better. So, we can start with the  grammar . Is it important? I think yeah, grammar is important but not that much. So, if I know what is the difference between "I will do" and "I did" or the difference between the other basic and important things, of course, it's enough. But if I want to speak about politics, science, or other specific topics, so I mean except the daily life conversation, of course, I need to learn more grammar. Well, for now, I don't need to learn more grammar. Writing How can we improve our writing skills? Of course, by typing... So, I usually choose a topic and write about it a blog every month nowadays. And I check them w

How Can I Think in English? How to Think in English

When I began to learn English, everyone said to me: "If you want to learn and speak quickly, you need to think in English, not your mother language." Then, I thought about it. How can I think in English? I was reading something in English. And I was listening and watching something in English mostly on YouTube. What can I do more than that? I tried to research on Google. And the first result was like that: "You need to live in a country that people speak English." But how? I have no money to live in another country. I need more basic things than that result. I continued to research. The second result was like that: "Around of you have to be English words. Like your phone and computer languages has to be English." At first, it was a frightening thing for me, but I didn't care. I changed the settings of the language on my phone and computer. But still, I needed more suggestions. When I continued to research, I found a few more suggestions. These suggesti