Passed
Push — master ( add66c...3bf222 )
by Christofer
01:09
created

src/old_chess/pieces/King.js   A

Size

Lines of Code 23

Duplication

Duplicated Lines 0
Ratio 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
nc 1
dl 0
loc 23
ccs 0
cts 5
cp 0
rs 10
noi 4

1 Function

Rating   Name   Duplication   Size   Complexity  
A King.js ➔ ??? 0 6 1
1
/**
2
 * King module
3
 * @module
4
 */
5
"use strict";
6
7
/**
8
 * Class with King logic
9
 */
10
class King {
11
    /**
12
     * init
13
     */
14
    constructor(color) {
15
        this.symbol = "K";
16
        this.moved = 0;
17
        this.active = true;
18
        this.color = color;
19
    }
20
21
    legalMove(x, y, nx, ny) {
0 ignored issues
show
Unused Code introduced by
The parameter x is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Unused Code introduced by
The parameter ny is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Unused Code introduced by
The parameter nx is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Unused Code introduced by
The parameter y is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
22
23
    }
24
}
25
26
27
module.exports = King;
28