Giter Site home page Giter Site logo

checkmate_funnychessgame's Introduction

Checkmate_FunnyChessGame

Knight vs King Checkmate Challenge


Helping your friend:

One of your friends is playing this funny chess game and he/she needs your help knowing that you're a software engineer. He/she wants you to tell him/her all the possible moves/jumps of the knight. Your friend also wants to know if the king is in check from the static position of the knight.

Now assume that in a funny chess play we have only 2 pieces, knight and the king. The king and knight stay at a static position (but not in the same position) and can not move at all.


The Board:

The chess board has 8 rows and 8 columns. The coordinate of a piece i.e knight, the king can be denoted as a {row number, column number}.

For example, in the first diagram, the coordinate of the black horse is {4,1} and the white horse is {6,5}


Sample input:

You will be provided two String, one is the king's coordinate and one for the knight.

[String one:] x, y

[String two:] x, y

WHERE: 8>= x and y >=1


Sample output:

The possible moves of the knight: {3,3}, {5,3}, {2,3}, {6,2}

Checkmate possible - Yes or No

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.