Daily Challenge #26

Daily Challenge for today is to post a daily challenge. Who will be the first?

2 Likes

Hi @Peter
I have a question…
Challenge should be related to inbuilt blocks(Kodular) or can be of extensions.
Just asking…:sweat_smile:
I have a challenge for today :sunglasses:

I would think inbuilt components. No extensions.

2 Likes

is this ok?

Chess Pieces

Create a function that takes the name of a chess piece, its position and a target position. The function should return true if the piece can move to the target and false if it can’t.

The possible inputs are “Pawn”, “Knight”, “Bishop”, “Rook”, “Queen” and “King”.

Examples

canMove("Rook", "A8", "H8") âžž true

canMove("Bishop", "A7", "G1") âžž true

canMove("Queen", "C4", "D6") âžž false

Notes

  • Do not include pawn capture moves and en passant.
  • Do not include castling.
  • Remember to include pawns’ two-square move on the second rank!
  • Look for patterns in the movement of the pieces
5 Likes