Skip to content

Commit

Permalink
Game.fromStartingPosition -> startingPosition
Browse files Browse the repository at this point in the history
  • Loading branch information
gcapizzi committed Jul 28, 2021
1 parent 30f7ce8 commit a1ba7e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/game.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe("Game", () => {

describe("fromStartingPosition", () => {
it("returns a Game from the starting position", () => {
const game = chess.Game.fromStartingPosition();
const game = chess.Game.startingPosition();

expect(game.getPiece(chess.Square.fromString("a1")!)).toEqual(chess.Piece.fromString("R"));
expect(game.getPiece(chess.Square.fromString("b1")!)).toEqual(chess.Piece.fromString("N"));
Expand Down
2 changes: 1 addition & 1 deletion src/game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class Game implements immutable.ValueObject {
return new Game();
}

static fromStartingPosition(): Game {
static startingPosition(): Game {
return Game.empty()
.addPiece(Piece.fromString("R")!, Square.fromString("A1")!)
.addPiece(Piece.fromString("N")!, Square.fromString("B1")!)
Expand Down

0 comments on commit a1ba7e4

Please sign in to comment.