Skip to content

Check if two or more Queen chess pieces are attacking each other

Notifications You must be signed in to change notification settings

dbridges12/AttackingQueens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Attacking Queens

Written in node.js. Run the index.js file with node installed in your command line:

node index.js

You can update the options in the index.js file. Results are written to the console.

It supports the following cases:

Case 1: Function returns true. 2 Queens are attacking on the same column

Image of Same Col

Case 2: Function returns true. 2 queens are attacking on the same row

Image of Same Row

Case 3: Function return true. 2 queens are attacking on the same diagonal

Image of Same Diag

Case 4: Function return true. 4 queens, 1 pair attacking

Image of four queens

Case 5: Function returns false. Not attacking because queens are the same color.

Image of same queens

About

Check if two or more Queen chess pieces are attacking each other

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published