Skip to content

Commit 3a82e96

Browse files
committed
Correct typos in documentation.
1 parent d5a3c2c commit 3a82e96

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

PGNParser/DraughtsMove.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
// Copyright © 2017 Tigerpixel Ltd. All rights reserved.
77
//
88

9-
import Foundation
109
import ParserCombinator
1110

1211
/// The positions on the board conform to an interger number.
@@ -17,7 +16,7 @@ typealias BoardPosition = Int
1716
*/
1817
public struct DraughtsPieceMove {
1918

20-
/// The starting position of the piece which should be moved.
19+
/// The location of the piece which should be moved.
2120
let origin: BoardPosition
2221
/// The resting position of the piece after the move is made.
2322
let destination: BoardPosition
@@ -41,7 +40,7 @@ extension DraughtsPieceMove {
4140
- parameter to: The location at which the piece resides after the move.
4241
*/
4342
init(origin: BoardPosition, isCapture: Bool, destination: BoardPosition) {
44-
43+
4544
self.origin = origin
4645
self.destination = destination
4746
self.isCapture = isCapture
@@ -52,8 +51,8 @@ extension DraughtsPieceMove {
5251
/**
5352
A description of the movement of pieces by both players.
5453

55-
Black is optional as it may not have moved in this round.
5654
A move in technical draughts terms refers to a round of moves by both players.
55+
Black is optional as it may not have moved in this round.
5756
*/
5857
public struct DraughtsMove {
5958

PGNParser/DraughtsNotationParser.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import ParserCombinator
1010
import Currier
1111

1212
/**
13-
Creates a parser to parse a description a draughts game in portable game notation to DraughtsMove objects.
13+
Creates a parser to parse a description of a draughts game in portable game notation to DraughtsMove objects.
1414
*/
1515
struct DraughtsNotationParser {
1616

1717
/**
18-
Create a parser which performs the parseing of portable game notation for draughts.
18+
Create a parser which performs the parsing of portable game notation for draughts.
1919

2020
Once created the parser can be called multiple times for multiple input game strings.
2121

@@ -49,7 +49,7 @@ struct DraughtsNotationParser {
4949

5050
- parameter turn: A parser for a single turn performed by one player.
5151

52-
- returns: A parser for a draughts move object describing both playes turn for a move.
52+
- returns: A parser for a draughts move object describing both player's turns for a move.
5353
*/
5454
private static func twoPlayerTurn(_ turn: Parser<DraughtsPieceMove>) -> Parser<DraughtsMove> {
5555

PGNParserTests/DraughtsMoveTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ class DraughtsMoveTests: XCTestCase {
277277
switch DraughtsMove.parse(fromPortableGameNotation: missingRoundNumber) {
278278
case .success(let moves, let tail):
279279

280-
// NOTE: This situation succeeds because there are valid results at the start of the input sting.
281-
// This may be deemed as unexpected and it may be better to find a way to make this fail.
280+
// NOTE: This succeeds because there are valid results at the start of the input sting.
281+
// It may be deemed as unexpected and it may be better to find a way to make this fail.
282282

283283
XCTAssertEqual(1, moves.count)
284284
XCTAssertEqual(" 14x23 27x18", String(tail))

0 commit comments

Comments
 (0)